-
Notifications
You must be signed in to change notification settings - Fork 439
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
Better naming for nonce meta tag #1315
Comments
Thanks for the proposal, but I don't think it's worth making such a change. Don't see the value. |
There is a value. It happened to me that I was passing a script nonce as a value to this meta tag, and things were not working well. Then I found out it needs to be a style nonce. |
Just include a random uuid, like this: <meta name="csp-nonce" content="03204eb84932e2af821e2fbdca66232a"> |
Ok, but I already have a style and script nonce, then why should I generate another one? That would mean unnecessary overhead and confusion at the same time. |
You don't have to generate another one, just use the one you already have. That nonce can be included in the header directives for script and style. They don't necessarily have to be different. In fact, they should be the same. That nonce is used by Turbo not only for styles but also to activate scripts in some cases. |
I propose changing the name from:
<meta name="csp-nonce" ... >
to:
<meta name="csp-style-nonce" ... >
... which is clear, since there can be a script nonce as well.
The text was updated successfully, but these errors were encountered: