App proxy has been blocked by CORS at App extension

Hello, im building shopify app extensions to making loyalty function to my store.
But in both dev and beta env, i cannot call app proxy to get data from my backend. I always get this error
image
So, i follow this instruction to add mode: ‘no-cors’ to my request. Cors error disappear, and i get 302 response.


But i still get correct response when i put this url on top of browser

My backend is nextjs route handler and i configured cors on my be already

Facing similar issue. Can anyone help here?

Hey @BrownTheFlower! We have some docs about this here.

I tried it already, but kept getting those errors

You don’t necessarily need to call your app proxy from a UI extension, you can just call your server directly as long as you have the network_access capability and you’ve requested access from the partner dashboard. You just need to make sure that you’re using the SessionToken api to validate that these requests came from your extension.

2 Likes