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:
+3
-1
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user