Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Development store Proxy app CORS problem

Development store Proxy app CORS problem

Tawnoz
Shopify Partner
1 0 0

Hi

I'm unable to use my development store Shopify proxy app when creating requests from my storefront code(hosted in Netlify) or from Postman - it gets CORS error. When I go directly to my proxy link, it works fine.

Access to XMLHttpRequest at 'https://MYSHOPNAME.myshopify.com/a/proxy/test' from origin 'https://test.MYDOMAINNAME.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
CartItems.client.tsx:34 Error ========> U {message: 'Network Error', name: 'AxiosError', code: 'ERR_NETWORK', config: {…}, request: XMLHttpRequest, …}
xhr.js:220 GET https://MYSHOPNAME.myshopify.com/a/proxy/test net::ERR_FAILED 302


Is it related somehow to development store password protection or pw page, which is not returning correct header?
Is there a workaround for development stores, for example add store password somewhere into request and bypass that check?


Replies 0 (0)