Customer accounts extension CORS error

I’m building a customer-account extension. I have to make an API call from here to my embedded app, but while making the api call, I’m getting a CORS error says

Error:
“Access to XMLHttpRequest at ‘https://afflr-beta-vk.ngrok.io/api/customer-account/dashboard’ from origin ‘null’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.“

from the extension i’ve enabled the network_access and api_access and using the nest.js for app server there also enabled to allow all origins with,

app.enableCors();
app.use(helmet());

and also tried to mention explicit access but still getting the issue, what am i missing?

Hi @VK_dev, does your server support CORS from any origin?

More information here from our Checkout UI docoumentation:

1 Like