mirror of
https://github.com/jointakahe/takahe.git
synced 2024-11-25 08:41:00 +00:00
Add cache-control header for static assets (#281)
This commit is contained in:
parent
07b28c7264
commit
b7b0b0dad4
1 changed files with 3 additions and 0 deletions
|
@ -38,6 +38,9 @@ http {
|
|||
|
||||
# Serves static files from the collected dir
|
||||
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/;
|
||||
try_files $uri /static//static-real$uri;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue