esm.sh
esm.sh copied to clipboard
CORS issue from localhost (per example) when running online (azure)
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" ],