-
Notifications
You must be signed in to change notification settings - Fork 283
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove skipping CSP nonce on
unsafe-inline
(#1010)
The current implementation for Rails's CSP nonce functionality intentionally skips adding a nonce to the script tag if the script-src directive includes `unsafe-inline`. However, using both a nonce and unsafe-inline at the same time is perfectly valid (and indeed sensible) behaviour. It allows the app to maintain some level of backwards compatibility with browsers that support CSP1 but not CSP2, c.f.: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src - Remove special handling of nonces when `unsafe-inline` is specified in the `script-src` directive
- Loading branch information
Showing
3 changed files
with
2 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters