Mastodon nginx: pull from Mastodon's /packs too

site-logo
Alex Gleason 2 years ago
parent 96ec0fa64f
commit 645c17eb81
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7

@ -97,11 +97,12 @@ server {
add_header Strict-Transport-Security "max-age=31536000" always; add_header Strict-Transport-Security "max-age=31536000" always;
} }
# Soapbox build files. # Soapbox & Mastodon (frontend) build files.
# New builds produce hashed filenames, so these should be cached heavily. # New builds produce hashed filenames, so these should be cached heavily.
location /packs { location /packs {
add_header Cache-Control "public, max-age=31536000, immutable"; add_header Cache-Control "public, max-age=31536000, immutable";
add_header Strict-Transport-Security "max-age=31536000" always; add_header Strict-Transport-Security "max-age=31536000" always;
try_files $uri @mastodon-public;
} }
# Soapbox configuration files. # Soapbox configuration files.
@ -116,6 +117,13 @@ server {
add_header Strict-Transport-Security "max-age=31536000" always; add_header Strict-Transport-Security "max-age=31536000" always;
} }
# Mastodon public files.
# https://github.com/mastodon/mastodon/tree/main/public
location @mastodon-public {
root /home/mastodon/live/public;
try_files $uri /index.html;
}
# Proxy to Mastodon's Ruby on Rails backend. # Proxy to Mastodon's Ruby on Rails backend.
location @proxy { location @proxy {
proxy_set_header Host $host; proxy_set_header Host $host;

Loading…
Cancel
Save