mirror of
https://github.com/mastodon/mastodon.git
synced 2025-01-09 11:55:09 +01:00
nginx: move processing of remaining static files to main location block
This commit is contained in:
parent
a9e111265e
commit
8303fcf48f
7
dist/nginx.conf
vendored
7
dist/nginx.conf
vendored
@ -65,17 +65,12 @@ server {
|
||||
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml image/x-icon;
|
||||
|
||||
location / {
|
||||
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains";
|
||||
try_files $uri @proxy;
|
||||
}
|
||||
|
||||
# If Docker is used for deployment and Rails serves static files,
|
||||
# then needed must replace line `try_files $uri =404;` with `try_files $uri @proxy;`.
|
||||
location = /sw.js {
|
||||
add_header Cache-Control "public, max-age=604800, must-revalidate";
|
||||
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains";
|
||||
try_files $uri =404;
|
||||
}
|
||||
|
||||
location ^~ /assets/ {
|
||||
add_header Cache-Control "public, max-age=2419200, must-revalidate";
|
||||
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains";
|
||||
|
Loading…
Reference in New Issue
Block a user