nginx: tipo MIME per jpg e mp4 (la foto del palio e i video arrivavano come application/octet-stream), cache lunga anche per loro e per il favicon; test che ogni estensione servita abbia il suo tipo

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A1dxvtsZx8NE9fwjXUNDBr
This commit is contained in:
2026-10-26 22:47:32 +01:00
co-authored by Claude Fable 5.1
parent ca3035e33f
commit 5392f042b3
2 changed files with 16 additions and 1 deletions
+3 -1
View File
@@ -26,6 +26,8 @@ server {
audio/mpeg mp3;
image/svg+xml svg;
image/x-icon ico;
image/jpeg jpg jpeg;
video/mp4 mp4;
font/woff2 woff2;
}
@@ -37,7 +39,7 @@ server {
location ~* \.(css|js|mjs|json)$ {
add_header Cache-Control "no-cache";
}
location ~* \.(png|webp|mp3|woff2)$ {
location ~* \.(png|webp|jpg|mp3|mp4|woff2|ico)$ {
add_header Cache-Control $media_cache;
}
location = /index.html {