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] keyword-source rule's 'self' definition should allow for websocket connections to the same origin #506

Closed
zdexter opened this issue Oct 23, 2015 · 1 comment

Comments

@zdexter
Copy link

zdexter commented Oct 23, 2015

Scenario: You are developing a web application that talks to HTTPS and WSS endpoints. You would like to specify connect-src 'self' so that you can make XHR requests. You would also like to make websocket requests to the same server.

Because 'self' matches host, port and scheme, this is impossible unless you enumerate or match all domains that the WSS server might run on. Many modern web applications use both HTTP and websockets; you establish an HTTP connection, download some assets, then establish a websocket connection.

The utility of 'self' is that you don't have to enumerate or match all possible domains - but this utility is unavailable if the application expects users to make websocket connections from their browsers.

@zdexter
Copy link
Author

zdexter commented Oct 23, 2015

Oops, looks like this is already tracked here: w3c/webappsec-csp#7

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