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.
For example request for: https://myshop.com/apps/my-proxy?color=red&productId=1231
Response headers are:
HTTP/1.1 301 Moved Permanently Server: nginx Date: Fri, 22 Feb 2019 14:44:44 GMT Content-Type: text/html; charset=UTF-8 Transfer-Encoding: chunked Connection: keep-alive X-Sorting-Hat-PodId: 117 X-Sorting-Hat-PodId-Cached: 1 X-Sorting-Hat-ShopId: MYSHOPID X-Sorting-Hat-PrivacyLevel: default X-Sorting-Hat-FeatureSet: default X-Sorting-Hat-Section: pod X-Sorting-Hat-ShopId-Cached: 1 Set-Cookie: secure_customer_sig=; path=/; expires=Tue, 22 Feb 2039 14:44:43 -0000; secure; HttpOnly X-Download-Options: noopen X-Dc: ash,ash Location: https://myproxyurl.com/creator/prod?color=red&path_prefix=%2Fapps%2Fmy-proxy&productId=1231&shop=myshop.com.myshopify.com&signature=XXXtimestamp=YYYYYY X-XSS-Protection: 1; mode=block X-Permitted-Cross-Domain-Policies: none X-Content-Type-Options: nosniff X-Request-ID: 86a1e144-bd93-479b-a47e-3add55aa34d5 Set-Cookie: cart_sig=YYYYYY; path=/; expires=Fri, 08 Mar 2019 14:44:43 -0000; HttpOnly X-Content-Type-Options: nosniff
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.