diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 385d5c76..a1d5ac40 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -379,6 +379,9 @@ http { } location = /install/web { + if ($request_uri ~ \?) { + rewrite ^(.*)$ $1? permanent; + } include snippets/security-headers-base.conf; add_header Content-Security-Policy "default-src 'none'; child-src 'self'; connect-src 'self' https://releases.grapheneos.org/; font-src 'self'; img-src 'self'; manifest-src 'self'; script-src 'self'; style-src 'self'; webrtc 'block'; form-action 'none'; frame-ancestors 'none'; base-uri 'none'" always; add_header Permissions-Policy "accelerometer=(), ambient-light-sensor=(), autoplay=(), battery=(), bluetooth=(), camera=(), clipboard-read=(), clipboard-write=(), display-capture=(), document-domain=(), encrypted-media=(), fullscreen=(), gamepad=(), geolocation=(), gyroscope=(), hid=(), idle-detection=(), interest-cohort=(), keyboard-map=(), local-fonts=(), magnetometer=(), microphone=(), midi=(), payment=(), picture-in-picture=(), publickey-credentials-get=(), screen-wake-lock=(), serial=(), speaker-selection=(), sync-xhr=(), xr-spatial-tracking=()" always; @@ -397,6 +400,9 @@ http { } location ~ "/$" { + if ($request_uri ~ \?) { + rewrite ^(.*)$ $1? permanent; + } include snippets/security-headers.conf; add_header Cross-Origin-Resource-Policy "same-origin" always; add_header Cache-Control "public, no-cache"; @@ -452,6 +458,9 @@ http { } location / { + if ($request_uri ~ \?) { + rewrite ^(.*)$ $1? permanent; + } include snippets/security-headers.conf; add_header Cross-Origin-Resource-Policy "same-origin" always; add_header Cache-Control "public, no-cache";