mirror of
https://github.com/mastodon/mastodon.git
synced 2025-01-09 19:56:20 +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;
|
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 / {
|
location / {
|
||||||
|
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains";
|
||||||
try_files $uri @proxy;
|
try_files $uri @proxy;
|
||||||
}
|
}
|
||||||
|
|
||||||
# If Docker is used for deployment and Rails serves static files,
|
# 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;`.
|
# 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/ {
|
location ^~ /assets/ {
|
||||||
add_header Cache-Control "public, max-age=2419200, must-revalidate";
|
add_header Cache-Control "public, max-age=2419200, must-revalidate";
|
||||||
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains";
|
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user