I created an application that uses a proxy, but unfortunately the response from the Shopify server after calling the url returns 301 and redirects to the address which is inserted as Proxy URL.
Is this the correct operation? It should not be that the user is still on the same domain of the store (with /apps/my-proxy), and only the content of app is on is displayed to him. When I call the Proxy URL it directly returns the 200 code, so it`s It is certainly not that my application responds with request 301.
I’m also seeing this on one of my apps, the app proxy returns a 200 and remains on the host store domain in development (stays on myshopify.com) but in production the app proxy returns a 301 to the app proxy url (leaves myshopify.com to 应用宝官网-全网最新最热手机应用游戏下载)
Hey, i have same issue with domain in development (stays on myshopify.com)
and custom domains on production, can you share the solution? there is no redirection from my server side
Wanted to add to this, in my case, I was making fetch calls to URLS that ended with forward slashes
e.g. /path/to/endpoint/ which caused/triggered a redirect by my laravel lumen backend to /path/to/endpoint without the forward slash.
it wasn’t immediately obvious to me why the 301 redirects were happening but this thread pointed me in the right direction, so thank you for this. the 301 redirects were changing my POST requests to GET requests and dropping the form data. the solution, at least for me, was to change my client-side fetch requests so that they don’t end with forward slashes ‘/’
this is obviously very dependent on how each backend is setup and how they handle redirects but im pretty sure, most of the time, it will likely be related to adding or not adding forward slashes to the end of your fetch request. i hope this helps someone else who doesn’t have access to tinkering around with the backend.