without try files

This commit is contained in:
einhornimmond 2025-05-21 16:57:46 +02:00
parent 7ca419b320
commit 30e22db650
2 changed files with 4 additions and 4 deletions

View File

@ -142,12 +142,12 @@ server {
location ~* \.(?:woff2?|ttf|otf|eot|jpg|jpeg|png|gif|svg|webp|ico)$ {
# keep assets for a week
add_header Cache-Control "public, max-age=604800";
try_files $uri =404;
# try_files $uri =404;
}
# hashed assets
location ~* \.(?:js|css|json)$ {
add_header Cache-Control "public, max-age=31536000, immutable";
try_files $uri =404;
# try_files $uri =404;
}
try_files $uri $uri/ /index.html = 404;

View File

@ -127,12 +127,12 @@ server {
location ~* \.(?:woff2?|ttf|otf|eot|jpg|jpeg|png|gif|svg|webp|ico)$ {
# keep assets for a week
add_header Cache-Control "public, max-age=604800";
try_files $uri =404;
# try_files $uri =404;
}
# hashed assets
location ~* \.(?:js|css|json)$ {
add_header Cache-Control "public, max-age=31536000, immutable";
try_files $uri =404;
# try_files $uri =404;
}
try_files $uri $uri/ /index.html = 404;