mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-08 02:38:11 +08:00
refinments to csp (#1422)
This commit is contained in:
+4
-1
@@ -61,11 +61,14 @@ class WSGIServer(Server):
|
|||||||
"img-src": ["'self'", "data:"],
|
"img-src": ["'self'", "data:"],
|
||||||
"object-src": "'none'",
|
"object-src": "'none'",
|
||||||
"base-uri": "'none'",
|
"base-uri": "'none'",
|
||||||
|
"upgrade-insecure-requests": "",
|
||||||
|
"frame-ancestors": "'none'",
|
||||||
|
"require-trusted-types-for": "'script'",
|
||||||
}
|
}
|
||||||
if len(style_hashes) > 0:
|
if len(style_hashes) > 0:
|
||||||
csp["style-src"] = style_hashes
|
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
|
@staticmethod
|
||||||
def load_csp_hashes(app):
|
def load_csp_hashes(app):
|
||||||
|
|||||||
Reference in New Issue
Block a user