From fddc7b902b52a3a5c5bb8a6ae8fbfe6ba02ca348 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Tue, 21 Jun 2022 11:15:23 -0500 Subject: [PATCH 1/2] Mastodon nginx: try to fix /packs cache --- installation/mastodon.conf | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/installation/mastodon.conf b/installation/mastodon.conf index 988a098b91..88a9c32356 100644 --- a/installation/mastodon.conf +++ b/installation/mastodon.conf @@ -98,7 +98,7 @@ server { location /packs { add_header Cache-Control "public, max-age=31536000, immutable"; add_header Strict-Transport-Security "max-age=31536000" always; - try_files /dev/null @static-files; + try_files $uri @mastodon-packs; } # Soapbox configuration files. @@ -130,6 +130,12 @@ server { try_files $uri @soapbox; } + # Like Mastodon public, without fallback to SPA. + location @mastodon-packs { + root /home/mastodon/live/public; + try_files $uri /dev/null; + } + # Soapbox & Mastodon static files. # Try Soapbox first, Mastodon, then fall back to the SPA. location @static-files { From f88dd7d5bb15f03323ba62fbac78d4335c52a6e2 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 22 Jun 2022 13:44:27 -0500 Subject: [PATCH 2/2] Mastodon nginx: remove try_files from @mastodon-packs --- installation/mastodon.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/installation/mastodon.conf b/installation/mastodon.conf index 88a9c32356..472fb27c9c 100644 --- a/installation/mastodon.conf +++ b/installation/mastodon.conf @@ -133,7 +133,6 @@ server { # Like Mastodon public, without fallback to SPA. location @mastodon-packs { root /home/mastodon/live/public; - try_files $uri /dev/null; } # Soapbox & Mastodon static files.