Whenever I send a request to my server App proxy sends it to Shopify store for no reason.
My Proxy URL: https://example.com/test/public/action
But I get this request returned from Ajax
Why it didn’t send it to the proxy URL I defined? Am I doing something wrong or its a bug?
2
Answers
I found the cause of the problem and it consists from two parts
1- there's a problem with laravel when using Shopify proxy it always return mixed content error
2- you can't use https, you have to start the Proxy URL with http or it will return page not found error
anyway all you have is to make a php file like index and make it as your templet file to display something in Shopify.
Once I find a solution to laravel I will edit this post.
I found solution for laravel it because of the trailing slash at the end so it redirect the request if the url not a folder to solve this issue
remove these two lines from .htaccess in public folder
You have to add the complete route. You can choose a prefix in the Shopify partner dashboard and also a sub path.
The prefixes could be:
So if for example you choose the tools prefix and “mysubpath” sub path, your route should be something like this: https://apiahmadztest.myshopify.com/tools/mysubpath/action?…
You can find more information in the documentation.