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

Allow disabling engine.io from emitting CORS headers #331

Closed
buunguyen opened this issue May 21, 2015 · 1 comment
Closed

Allow disabling engine.io from emitting CORS headers #331

buunguyen opened this issue May 21, 2015 · 1 comment

Comments

@buunguyen
Copy link

I've deployed a socket.io app behind Nginx, which is configured to emit CORS headers. The problem is socket.io also emits the same headers, which is disallowed by browsers due to non-duplication rule.

To fix this, I moved all CORS handling to the app. This works except when Nginx cannot reach the backend (e.g. server is restarted) and return responses without CORS headers, causing browsers to reject all requests, including the socket.io XHR polling requests. When this happens, the client app cannot see the error status and message returned by Nginx to display proper error messages to users.

It would be great if there's an option to prevent engine.io from emitting CORS headers.

@darrachequesne
Copy link
Member

@buunguyen sorry for the delay. Please feel free to open a PR for that feature!

This issue was closed.
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

2 participants