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

CSP: connect-src 'self' and websockets #489

Closed
klings opened this issue Sep 28, 2015 · 1 comment
Closed

CSP: connect-src 'self' and websockets #489

klings opened this issue Sep 28, 2015 · 1 comment
Labels
Milestone

Comments

@klings
Copy link

klings commented Sep 28, 2015

Declaring a CSP with connect-src ‘self’ will not allow websockets back to the same host/port, since they're not same origin. This might come as a surprise to developers that haven't studied the CSP specification in detail and have a firm grasp of the same origin security model.

One option could be to add a note to the spec to clarify that this is the intended behaviour. Another option could be to make an exception for connect-src 'self', and allow ws(s): requests to same host/port.

I'm not sure what the security implications could be of the latter, but it might be worth some consideration.

@mikewest
Copy link
Member

mikewest commented Oct 7, 2015

This issue was moved to w3c/webappsec-csp#7

@mikewest mikewest closed this as completed Oct 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants