enable brotli/gzip via precompression for Element

This commit is contained in:
Daniel Micay 2021-07-06 13:53:00 -04:00
parent a653d8bd2f
commit 740b720285
4 changed files with 57 additions and 1 deletions

View file

@ -138,7 +138,7 @@ http {
listen [::]:443 ssl http2;
server_name element.grapheneos.org;
root /usr/share/webapps/element;
root /srv/element.grapheneos.org;
include snippets/security-headers.conf;
add_header Cross-Origin-Resource-Policy "same-origin" always;
@ -146,6 +146,11 @@ http {
# obsolete and replaced with Content-Security-Policy frame-ancestors 'self'
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Robots-Tag "none";
location ~ '\.(css|html|ico|js|json|map|pdf|svg|txt|wasm|xml)$' {
gzip_static on;
brotli_static on;
}
}
server {