Re: Using App Proxy while Store has Password Page Enabled

Using App Proxy while Store has Password Page Enabled

Nate12
Shopify Partner
10 0 0

Hi,

It looks like My App Proxy does not work while my store has it's password page enabled.

XMLHttpRequest cannot load https://[ MY STORE ].com/apps/app_root/data. Redirect from 'https://[ MY STORE ].com/apps/app_root/data' to 'https://[ MY STORE ].com/password' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://[MY APP SERVER].com' is therefore not allowed access.

Any way to get around this?

Replies 6 (6)

Nate12
Shopify Partner
10 0 0
XMLHttpRequest cannot load https://[ MY STORE ].com/apps/app_root/data. 
Redirect from 'https://[ MY STORE ].com/apps/app_root/data' 
to 'https://[ MY STORE ].com/password' has been blocked by CORS policy: 
No 'Access-Control-Allow-Origin' header is present on the requested resource. 
Origin 'https://[MY APP SERVER].com' is therefore not allowed access.

 

mjmabato
New Member
9 0 0

follow up on this

mjmabato
New Member
9 0 0

anyone can help to avoid this error, i tried to test the app in a live store but still needs my app to be reviewed which is total nonsense since im still developing my app.

 

How can I avoid the the password page as result on my app proxy request in my public app. Currently using development store as testing platform

Nico4
Shopify Partner
25 0 12

Exact same problem here

jgile
Visitor
2 0 0

bump

Barenziah
Shopify Partner
3 0 0

I'm not sure how helpful this since this is a very old issue but for future reference, anyone can get CORS issues if they are trying to access your store from a localhost. CORS exists in your browser by default and if your app-proxy is deployed to operate on the same domain as your store, the problem should go away.
For development, most people use npm-cors (on the npm site) which you'll set up in your index.js. This is just for development so you should probably get rid of it before deployment, especially since you shouldn't need it.