Commit 20290b1e authored by captainwong's avatar captainwong

fix baidu tongji

parent 51513117
Pipeline #94 failed with stages
......@@ -85,7 +85,7 @@ def add_security_headers(resp):
#resp.headers['Content-Security-Policy'] = "default-src 'self' 'unsafe-inline' 'unsafe-eval'; font-src 'self' data:; img-src 'self' data:"
#if request.endpoint == "editbook.edit_book" or config.config_use_google_drive:
# resp.headers['Content-Security-Policy'] += " *"
resp.headers['Content-Security-Policy'] += ";script-src 'self' https://hm.baidu.com 'unsafe-inline' 'unsafe-eval';"
resp.headers['Content-Security-Policy'] = "script-src 'self' https://hm.baidu.com 'unsafe-inline' 'unsafe-eval';"
resp.headers['X-Content-Type-Options'] = 'nosniff'
resp.headers['X-Frame-Options'] = 'SAMEORIGIN'
resp.headers['X-XSS-Protection'] = '1; mode=block'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment