Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
de-peter opened this issue Nov 26, 2024 · 0 comments
Open

Comments

@de-peter
Copy link

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" ],

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant