refinments to csp (#1422)

This commit is contained in:
Bruce Martin
2020-04-23 09:54:09 -07:00
committed by GitHub
parent a2047b90ae
commit 735eb11eb7
+4 -1
View File
@@ -61,11 +61,14 @@ class WSGIServer(Server):
"img-src": ["'self'", "data:"],
"object-src": "'none'",
"base-uri": "'none'",
"upgrade-insecure-requests": "",
"frame-ancestors": "'none'",
"require-trusted-types-for": "'script'",
}
if len(style_hashes) > 0:
csp["style-src"] = style_hashes
Talisman(app, force_https=app_config.server__force_https, content_security_policy=csp)
Talisman(app, force_https=app_config.server__force_https, frame_options='DENY', content_security_policy=csp)
@staticmethod
def load_csp_hashes(app):