mirror of
https://github.com/onionshare/onionshare.git
synced 2024-10-01 01:35:40 -04:00
Update the Content-Security-Policy: remove style-src and script-src which are inherited by default-src. Add frame-ancestors, form-action and base-uri which do not inherit default-src
This commit is contained in:
parent
470fb2bda3
commit
330e602694
@ -310,7 +310,7 @@ class Web:
|
|||||||
if not self.settings.get("website", "disable_csp") or self.mode != "website":
|
if not self.settings.get("website", "disable_csp") or self.mode != "website":
|
||||||
r.headers.set(
|
r.headers.set(
|
||||||
"Content-Security-Policy",
|
"Content-Security-Policy",
|
||||||
"default-src 'self'; style-src 'self'; script-src 'self'; img-src 'self' data:;",
|
"default-src 'self'; frame-ancestors 'none'; form-action 'self'; base-uri 'self'; img-src 'self' data:;",
|
||||||
)
|
)
|
||||||
return r
|
return r
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user