set up basic frame security headers

This commit is contained in:
Daniel Micay 2021-06-18 05:05:39 -04:00
parent f9a50f988a
commit 144698a02f

View File

@ -89,6 +89,8 @@ http {
root /usr/share/webapps/element;
include snippets/security-headers.conf;
add_header Content-Security-Policy "frame-ancestors 'self'";
add_header X-Frame-Options "SAMEORIGIN";
add_header X-Robots-Tag "none";
}
@ -100,13 +102,19 @@ http {
root /var/empty;
include snippets/security-headers.conf;
add_header Content-Security-Policy "frame-ancestors 'none'";
add_header X-Frame-Options "DENY";
location = / {
return 301 https://grapheneos.org/articles/grapheneos-servers#matrix.grapheneos.org;
}
location ~* ^(\/_matrix|\/_synapse\/client) {
proxy_hide_header Content-Security-Policy;
proxy_hide_header X-Frame-Options;
include snippets/security-headers.conf;
add_header Content-Security-Policy "frame-ancestors 'none'";
add_header X-Frame-Options "DENY";
add_header X-Robots-Tag "none";
proxy_pass http://backend;