esm.sh icon indicating copy to clipboard operation
esm.sh copied to clipboard

CORS issue from localhost (per example) when running online (azure)

Open de-peter opened this issue 1 year ago • 0 comments

using a web project with vite

resolve: { alias: [ { find: "react", replacement: "https://<myserver.de>/react@latest" }, { find: "react-dom", replacement: "https://<myserver.de>/react-dom@latest" }, ] }

and getting this error: Access to script at 'https://<myserver.de>/react@latest' from origin 'http://localhost:8080' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

server config: "corsAllowOrigins": [],

also tried: "corsAllowOrigins": [ "http://localhost:8080" ],

de-peter avatar Nov 26 '24 09:11 de-peter