let req = new XMLHttpRequest() req.open( "GET", context.state.checkout.webUrl ) req.setRequestHeader("X-Shopify-Customer-Access-Token", window.localStorage.shopifyAccessToken); req.setRequestHeader("Access-Control-Allow-Origin", "*"); req.send();
redirecting to the Buy SDK webUrl with an associated customer and the request is being blocked by CORS ...
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://xxxxx.myshopify.com/..... (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).
Have you tried redirecting the customer to context.state.checkout.webUrl, instead of using AJAX?
Have you created a collection on your online store and experienced an issue with adding yo...By Ollie Aug 24, 2022