You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Consider having ContentSecurityPolicyHeaderWriter supply a script nonce #10826
Instead of a {nonce} placeholder in the directives string, would it be a better idea to accept a Function<String, String> in ContentSecurityPolicyConfig?
I tried to implement nonce support in two approaches. It turns out that the {nonce} placeholder approach can be implemented with less changes under the constraint of not breaking existing APIs.
Activity
ziqin commentedon Jan 10, 2026
Instead of a
{nonce}placeholder in the directives string, would it be a better idea to accept aFunction<String, String>inContentSecurityPolicyConfig?ziqin commentedon Jan 14, 2026
I tried to implement nonce support in two approaches. It turns out that the
{nonce}placeholder approach can be implemented with less changes under the constraint of not breaking existing APIs.Support nonce-based Content-Security-Policy
Support configuring nonce-based Content-Security-Policy
Support nonce-based Content-Security-Policy
Support configuring nonce-based Content-Security-Policy
Support nonce-based Content-Security-Policy
Support configuring nonce-based Content-Security-Policy
ziqin commentedon Jan 14, 2026
Hi, @jzheaux!
I have implemented the
{nonce}approach in PR #18499. Would you like to review it?Support nonce-based Content-Security-Policy
Support configuring nonce-based Content-Security-Policy
Support nonce-based Content-Security-Policy
Support configuring nonce-based Content-Security-Policy
Support nonce-based Content-Security-Policy
Support configuring nonce-based Content-Security-Policy
Support nonce-based Content-Security-Policy
Support configuring nonce-based Content-Security-Policy
Support configuring nonce-based Content-Security-Policy