mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-08-26 12:46:08 +00:00
apache2: Allow popups to have different sandbox policy
- Without this change when opening popups, Firefox throws the error 'Blocked Page' under certain conditions. - Complete a comment that was seemingly left unfinished. Tests: - With the changes installed with 'make build install', opening popups with <a target="_blank"></a> works without 'Blocked page' error. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Veiko Aasa <veiko17@disroot.org>
This commit is contained in:
parent
c35555a273
commit
d38f787a42
@ -72,15 +72,18 @@ RedirectMatch "^/$" "/plinth"
|
|||||||
## Enable strict sandboxing enabled with some exceptions:
|
## Enable strict sandboxing enabled with some exceptions:
|
||||||
## - Allow running Javascript.
|
## - Allow running Javascript.
|
||||||
## - Allow popups as sometimes we use <a target=_blank>
|
## - Allow popups as sometimes we use <a target=_blank>
|
||||||
|
## - Allow popups to have different sandbox requirements as we launch apps' web
|
||||||
|
## clients.
|
||||||
## - Allow forms to support configuration forms.
|
## - Allow forms to support configuration forms.
|
||||||
## -
|
## - Allow policies to treat same origin differently from other origins
|
||||||
|
## - Allow downloads such as backup tarballs.
|
||||||
##
|
##
|
||||||
## Disable browser guessing of MIME types. FreedoBox already sets good content
|
## Disable browser guessing of MIME types. FreedoBox already sets good content
|
||||||
## types for all the common file types.
|
## types for all the common file types.
|
||||||
##
|
##
|
||||||
<LocationMatch "^/(plinth|freedombox)">
|
<LocationMatch "^/(plinth|freedombox)">
|
||||||
Header set Referrer-Policy 'same-origin'
|
Header set Referrer-Policy 'same-origin'
|
||||||
Header set Content-Security-Policy "font-src 'self'; frame-src 'none'; img-src 'self'; manifest-src 'none'; media-src 'none'; object-src 'none'; script-src 'self'; style-src 'self'; worker-src 'self'; default-src 'self'; base-uri 'none'; sandbox allow-scripts allow-popups allow-forms allow-same-origin allow-downloads; form-action 'self'; frame-ancestors 'none'; block-all-mixed-content;"
|
Header set Content-Security-Policy "font-src 'self'; frame-src 'none'; img-src 'self'; manifest-src 'none'; media-src 'none'; object-src 'none'; script-src 'self'; style-src 'self'; worker-src 'self'; default-src 'self'; base-uri 'none'; sandbox allow-scripts allow-popups allow-popups-to-escape-sandbox allow-forms allow-same-origin allow-downloads; form-action 'self'; frame-ancestors 'none'; block-all-mixed-content;"
|
||||||
Header set X-Content-Type-Options 'nosniff'
|
Header set X-Content-Type-Options 'nosniff'
|
||||||
</LocationMatch>
|
</LocationMatch>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user