Add cache-control header for static assets (#281)
This commit is contained in:
parent
07b28c7264
commit
b7b0b0dad4
|
@ -38,6 +38,9 @@ http {
|
||||||
|
|
||||||
# Serves static files from the collected dir
|
# Serves static files from the collected dir
|
||||||
location /static/ {
|
location /static/ {
|
||||||
|
# Files in static have cache-busting hashes in the name, thus can be cached forever
|
||||||
|
add_header Cache-Control "public, max-age=604800, immutable";
|
||||||
|
|
||||||
alias /takahe/static-collected/;
|
alias /takahe/static-collected/;
|
||||||
try_files $uri /static//static-real$uri;
|
try_files $uri /static//static-real$uri;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue