From 9d5f83c9092f909f7487e585872149e9dcbd7393 Mon Sep 17 00:00:00 2001 From: waffles Date: Sun, 22 Jan 2023 15:46:42 -0800 Subject: [PATCH] Support tilde redirects --- roles/frontend/templates/mastodon.j2 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/roles/frontend/templates/mastodon.j2 b/roles/frontend/templates/mastodon.j2 index c898618..d072d81 100644 --- a/roles/frontend/templates/mastodon.j2 +++ b/roles/frontend/templates/mastodon.j2 @@ -60,6 +60,12 @@ server { try_files $uri @proxy; } + # support ~waffles type homedir redirects + location ~ ^/~(.+)?$ { + rewrite ^/(.*) https://home.yttrx.com/$1 permanent; + } + + # WITH S3 location ~ ^/(emoji|packs) { add_header Cache-Control "public, max-age=31536000, immutable";