-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
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
feat(ssr): add csp nonce to all elements #11826
base: main
Are you sure you want to change the base?
feat(ssr): add csp nonce to all elements #11826
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.
LGTM
@posva is this good to merge - could be useful for many people. I forgot about this PR myself as we forked and patched the change. |
any update? |
Is it possible to merge this as part of |
8e40316
to
8df91b8
Compare
add csp nonce to all elements that could potentiall be affected by CSP directives
8df91b8
to
5449d9e
Compare
@yyx990803 i've updated this to the main branch |
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
If yes, please describe the impact and migration path for existing applications:
The PR fulfills these requirements:
dev
branch for v2.x (or to a previous version branch), not themaster
branchfix #xxx[,#xxx]
, where "xxx" is the issue number)Other information:
CSPv3 allows simple nonce based policies and directives such as
stict-dynamic
. Declaring a policy such as:Would not work with current nonce support with features such as resource hints. This policy creates errors such as
This is because not all rendered elements have an associated nonce.
To support stricter policies that only work scripts / resource hinting add
nonce
attribute to all element that could be affected via a nonce based policy.