diff options
| author | Daniel Micay <daniel.micay@grapheneos.org> | 2024-04-20 13:21:06 -0400 |
|---|---|---|
| committer | Daniel Micay <daniel.micay@grapheneos.org> | 2024-04-20 13:24:43 -0400 |
| commit | b13243492982287364927a1f9917e696a0edd16c (patch) | |
| tree | f78a6ff30f1683d645e71474f3e68ce9bbf8f0cc /nginx | |
| parent | 0687ad9ee27ddaecf87e97b3dcca1267f69f129c (diff) | |
add redirects for query parameters with static HTML
Diffstat (limited to 'nginx')
| -rw-r--r-- | nginx/nginx.conf | 9 |
1 files changed, 9 insertions, 0 deletions
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"; |
