From 6fbd66ddfa89fc80dd9df642ec79d5f086f083b3 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Mon, 25 Dec 2023 10:55:05 -0500 Subject: [PATCH] use 301 redirect with 1 day caching for Discord There are scenarios where we may have to change the URL so the default 301 behavior is inappropriate but this will work fine. --- nginx/nginx.conf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 55a70d97..7f6ccae2 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -281,7 +281,9 @@ http { } location = "/discord" { - return 302 https://discord.com/invite/grapheneos; + include snippets/security-headers.conf; + add_header Cache-Control "public, max-age=86400"; + return 301 https://discord.com/invite/grapheneos; } location = /404 {