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: Document http->https, and wss being allowed in 'self' #36168

Open
wbamberg opened this issue Oct 2, 2024 · 0 comments · May be fixed by #36198
Open

CSP: Document http->https, and wss being allowed in 'self' #36168

wbamberg opened this issue Oct 2, 2024 · 0 comments · May be fixed by #36198
Labels
Content:HTTP HTTP docs help wanted If you know something about this topic, we would love your help!

Comments

@wbamberg
Copy link
Collaborator

wbamberg commented Oct 2, 2024

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/connect-src has a note:

Screen Shot 2024-10-02 at 12 00 50 PM

This is I think out of date but it refers to an interesting spec change that we should document: w3c/webappsec-csp@0e81d81.

http: is not equivalent to http: https:, and ws: to ws: wss:.
Likewise, handling for 'self' now includes https: and wss: on
the protected resource's host.

(I think "not" above should be "now")

The idea I think is that:

  • if you specify http: as the scheme in a source expression, the browser will allow https:
  • if you specify ws: as the scheme in a source expression, the browser will allow wss:
  • if you specify 'self' in a source expression, then wss: is allowed for the scheme if the rest of the origin matches
@github-actions github-actions bot added Content:HTTP HTTP docs needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Oct 2, 2024
@Josh-Cena Josh-Cena added help wanted If you know something about this topic, we would love your help! and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:HTTP HTTP docs help wanted If you know something about this topic, we would love your help!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants