Encountering a CORS error in the Checkout UI when making a fetch call to the Shopify Remix App API.

bkmahapatra27
Shopify Partner
5 0 0

bkmahapatra27_0-1705043606715.png

 

Encountering a CORS error while attempting to make fetch calls from the Checkout UI app to various API routes in my custom Shopify Remix app.

Replies 2 (2)

BoostShop
Shopify Partner
5 0 1

Are you trying to make an OTP?

You can't send data from front-end to back-end like this, you need to make a proxy server that will be the bridge.

 

Boost Shop: Countdown Timer
bkmahapatra27
Shopify Partner
5 0 0

This pertains to OTP requests, but other calls for sending simple data are also unsuccessful when attempting to fetch from the Checkout UI using the fetch method.
https://shopify.dev/docs/api/shopify-app-remix/v1/guide-admin

bkmahapatra27_0-1705054098521.png

I have tried the above but couldn't get any result