nginx regex: don't capture groups unnecessarily

This commit is contained in:
Daniel Micay 2021-11-23 20:00:41 -05:00
parent 5fcd75f795
commit bfcc6b5958

View File

@ -107,7 +107,7 @@ http {
return 301 https://grapheneos.org/articles/grapheneos-servers#matrix.grapheneos.org;
}
location ~ ^(/_matrix|/_synapse/client) {
location ~ ^(?:/_matrix|/_synapse/client) {
# remove security headers that are statically set to the strictest possible values below
proxy_hide_header Referrer-Policy;
proxy_hide_header X-Frame-Options;
@ -148,7 +148,7 @@ http {
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Robots-Tag "none";
location ~ '\.(css|html|ico|js|json|map|svg|txt|wasm|xml)$' {
location ~ '\.(?:css|html|ico|js|json|map|svg|txt|wasm|xml)$' {
gzip_static on;
brotli_static on;
}