blocked by CORS policy -No'Access control allow origin '

Milapdeep
New Member
1 0 0

Hi team

I fetch discount codes from lookup.JSON to check if it is valid or not on cart page,  I got this error when hit discount coupon code , in console "Access to fetch at 'https://abc.myshopify.com/admin/discount_codes/lookup.json?code=fdgg' (redirected from 'https://www.abc.com/admin/discount_codes/lookup.json?code=fdgg') from origin 'https://www.abc.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource" . But this code already working on my another testing store " https://xyz.myshopify.com/ ".  Can you help to solve this issue?

 

Thanks in advance

0 Likes