Ad

"App Proxy" Send Request To My "shopify Shop" Instead Of My Application ? [Shopify]

- 1 answer

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

GET https://apiahmadztest.myshopify.com/action?shop=apiahmadztest.myshopify.com&path_prefix=%2Fapps%2Ffilter&timestamp=155579128&signature=9ceb23e244545faf5ad65f36b1196e6cfba57c9088a7d7dde96978970d 404 (Not Found)

Why it didn't send it to the proxy URL I defined? Am I doing something wrong or its a bug?

Ad

Answer

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

RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
Ad
source: stackoverflow.com
Ad