After update shopify and remix pacakages getting cros error

Topic summary

A developer encountered a CORS (Cross-Origin Resource Sharing) error in their Checkout UI extension after upgrading Shopify and Remix packages.

Technical Details:

  • The error occurs when making a POST request from the Checkout UI extension to an API endpoint
  • The code includes an Authorization header with a session token and attempts to set Access-Control-Allow-Origin: *
  • An error screenshot was provided showing the CORS issue

Current Status:

  • The issue remains unresolved with no responses yet
  • The developer is seeking help to fix the CORS configuration after the package updates
Summarized with AI on November 1. AI used: claude-sonnet-4-5-20250929.

HI

When I upgraded Shopify and Remix package, I am getting cors error in Checkout UI extension. This is the code of Checkout UI.

useEffect(()=>{> async function getData() {> try {> const token = await sessionToken.get();> const response = await fetch(${app_url}/api/checkout/checkout, {> method: “POST”,> headers: {> ‘Content-Type’: ‘application/json’,> Authorization: Bearer ${token},> “Access-Control-Allow-Origin”: “*”,> },> body: JSON.stringify({> shop: shop.myshopifyDomain,> checkout_token : ${checkoutToken}> }),> });> > const data = await response.json();> console.log(“Fetched data:”, data); // Handle the data as needed> } catch (error) {> console.error(“Error fetching data:”, error);> }> }> getData();> }, );

Thanks for help