Bring the CSP up to standard.
This commit is contained in:
parent
e7926952b3
commit
3d42e35ec2
1 changed files with 6 additions and 6 deletions
|
@ -51,12 +51,12 @@ def teardown_request(error):
|
|||
|
||||
@app.after_request
|
||||
def after_request(response: Response):
|
||||
response.headers.add("Content-Security-Policy", (
|
||||
" script-src: 'self' https://*.googletagmanager.com"
|
||||
" img-src: https://*.google-analytics.com https://*.googletagmanager.com"
|
||||
" connect-src: 'self' https://*.google-analytics.com https://*.analytics.google.com https://*.googletagmanager.com"
|
||||
" object-src: 'none'"
|
||||
))
|
||||
response.headers.add("Content-Security-Policy", ("""
|
||||
script-src 'self' https://*.googletagmanager.com;
|
||||
img-src https://*.google-analytics.com https://*.googletagmanager.com;
|
||||
connect-src 'self' https://*.google-analytics.com https://*.analytics.google.com https://*.googletagmanager.com;
|
||||
object-src 'none';
|
||||
"""))
|
||||
response.headers.add("Strict-Transport-Security", "max-age=31536000")
|
||||
response.headers.add("X-Frame-Options", "deny")
|
||||
return response
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue