-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add custom
nonce
s to inline scripts and styles returned by pygal
This sets a hard-coded `script_src` and `style_src` CSP that is only returned in the usersuite index, which is the only location where we use `pygal`. This allows us to forbid un-tagged inline scripts and styles via CSP. `flask.g` is used because we (unfortunately) render the traffic graph indirectly via global jinja callable instead of passing it directly to the template as an argument.
- Loading branch information
1 parent
be45ba0
commit f10ce9f
Showing
2 changed files
with
72 additions
and
2 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