-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add CORS headers to server #749
Comments
Could you try this config.setOrigin("*"); It adds a wildcard to the 'Access-Control-Allow-Origin' header |
does not work |
I have a same probelem.Is there something way to solve this? |
config.setAllowHeaders("*"); |
Old post but I believe this can also be solved by using the angular proxy configuration (partially an assumption, but I've had similar things with rest api's in dev environments). More here: https://angular.io/guide/build#proxying-to-a-backend-server Will close this issue and good luck to anyone reading this. |
Currently our Angular based project is failing to connect to our java socket-io backend. As far as we can see this happens due to the browser rejecting the connection because of an invalid CORS header.
How do you configure these headers to be correct and allow any connection from any IP?
We tried:
config.setOrigin("");
config.setOrigin("[full ip]");
config.setOrigin("[full ip]:");
and various mutations similar, none seem to work though
The text was updated successfully, but these errors were encountered: