We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
We allow inline-styles in case Authors want to use them. However few do and in #965 we cleaned them all up to use classes instead.
Should we remove unsafe-inline from our CSP as per best practice?
unsafe-inline
Or do we think we want to keep the ability to have in-line styles directly in HTML elements?
We still have some <style> code directly in our HTML templates in the <head>, but they are easily handled with a nonce same as we do for scripts:
<style>
<head>
So, from this:
<style> ... </style>
to this:
<style nonce="{{ csp_nonce() }}"> ... </style>
And would need to add style-src to our nonce config:
style-src
almanac.httparchive.org/src/main.py
Line 30 in db9bc92
As we already use this for script-src I think this is safe to do.
script-src
The text was updated successfully, but these errors were encountered:
This seems like a good idea
Sorry, something went wrong.
tunetheweb
Successfully merging a pull request may close this issue.
We allow inline-styles in case Authors want to use them. However few do and in #965 we cleaned them all up to use classes instead.
Should we remove
unsafe-inline
from our CSP as per best practice?Or do we think we want to keep the ability to have in-line styles directly in HTML elements?
We still have some
<style>
code directly in our HTML templates in the<head>
, but they are easily handled with a nonce same as we do for scripts:So, from this:
to this:
And would need to add
style-src
to our nonce config:almanac.httparchive.org/src/main.py
Line 30 in db9bc92
As we already use this for
script-src
I think this is safe to do.The text was updated successfully, but these errors were encountered: