Add cache-control header for static assets (#281)

This commit is contained in:
Corry Haines 2022-12-27 10:25:18 -08:00 committed by GitHub
parent 07b28c7264
commit b7b0b0dad4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
}