-
Notifications
You must be signed in to change notification settings - Fork 50
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 Content Security Policy check on request #367
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks reasonable in the short term, but we should give you a cleaner hook for this: you shouldn't have to create an intermediate request
object.
The behavior it specifies, however, would be equivalent to this: the empty destination will result in a connect-src
(or default-src
) check against the URL provided, using the policies specified on the document from which the connection is being established.
Do we have WPT covering this case?
There are csp-pass.https.window.js and csp-fail.https.window.js. |
I agree we should provide a better hook in CSP. I will think about it but I am not totally sure how to integrate it cleanly. Nit: Notice that |
Done. |
We only need the pre-request check. We don't need the post-request check given there is no redirects on WebTransport.
155a1b9
to
e1a7f10
Compare
@martinthomson @vasilvv @jan-ivar can you take a look again? |
We only need the pre-request check. We don't need the post-request
check given there is no redirects on WebTransport.
This is for #59.
Preview | Diff