-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Use nonce attribute for all scripts and preloads if provided #4539
Conversation
When implementing a strict CSP with nonces and strict-dynamic every script and preload requires a nonce.
LGTM. Can we get this in soon? Because of this bug, I currently have to add |
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.
Can you add a test for this in test/integration/app-document?
@timneutkens i added a test, i believe it tests all instances except for the dynamic chunks, not sure how to test those inside of the app-document test suite |
@novascreen that's fine, no worries 👍 |
This is great. But there is no documentation at all on using nonces. Example in the docs would be much appreciated. Thanks. |
@joaovieira there are some details in the README and an example now: |
When implementing a strict CSP with nonces and
strict-dynamic
, every script and preload requires a nonce.https://csp.withgoogle.com/docs/strict-csp.html