From 26d90ef5d69c30873e95b052b9b4e7bef202788a Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Wed, 20 Mar 2024 20:50:48 -0400 Subject: [PATCH] stop redirecting the entire vanadium.app domain --- nginx/nginx.conf | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 2f309d99..3e0b5607 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -167,16 +167,36 @@ http { server { listen 443 ssl http2; listen [::]:443 ssl http2; - server_name vanadium.app www.vanadium.app; + server_name www.vanadium.app; keepalive_timeout 3m; include snippets/security-headers.conf; add_header Cross-Origin-Resource-Policy "same-origin" always; + # https://trac.nginx.org/nginx/ticket/2012 location / { + return 301 https://vanadium.app$request_uri; + } + } + + server { + listen 443 ssl http2; + listen [::]:443 ssl http2; + server_name vanadium.app; + + keepalive_timeout 3m; + + include snippets/security-headers.conf; + add_header Cross-Origin-Resource-Policy "same-origin" always; + + location = / { return 301 https://grapheneos.org/features#vanadium; } + + location / { + return 404; + } } server {