From ac9b2813506d590402071aa3e7f92648473f874a Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Tue, 10 May 2022 17:56:51 -0500 Subject: [PATCH] Mastodon nginx: route /.well-known/host-meta, fix /packs --- installation/mastodon.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/installation/mastodon.conf b/installation/mastodon.conf index 1c3de0961..0b7095b7f 100644 --- a/installation/mastodon.conf +++ b/installation/mastodon.conf @@ -1,4 +1,4 @@ -# Nginx configuration for Soapbox on Mastodon. +# Nginx configuration for Soapbox atop Mastodon. # Adapted from: https://github.com/mastodon/mastodon/blob/b4d373a3df2752d9f8bdc0d7f02350528f3789b2/dist/nginx.conf # # Edit this file to change occurences of "example.com" to your own domain. @@ -75,7 +75,7 @@ server { # Mastodon backend routes. # These are routes to Mastodon's API and important rendered pages. - location ~ ^/(api|oauth|auth|admin|pghero|sidekiq|manifest.json|.well-known/webfinger|@(.+)/embed$) { + location ~ ^/(api|oauth|auth|admin|pghero|sidekiq|manifest.json|.well-known/webfinger|.well-known/host-meta|@(.+)/embed$) { try_files /dev/null @proxy; } @@ -96,7 +96,7 @@ server { # Soapbox build files. # New builds produce hashed filenames, so these should be cached heavily. - location ~ ^/(packs|emoji) { + location /packs { add_header Cache-Control "public, max-age=31536000, immutable"; add_header Strict-Transport-Security "max-age=31536000" always; }