Versione del gioco (src/version.js, 0.1.0): immagini, musiche e voci con ?v=<versione> e cache lunga in nginx; scripts/bump.sh e make bump per le versioni nuove
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018ks2K99uqCZjAxvy7Rdj1R
This commit is contained in:
+9
-3
@@ -1,3 +1,10 @@
|
||||
# Immagini, audio e font chiesti con ?v=<versione> (src/version.js) non cambiano mai a quell'indirizzo: cache lunga.
|
||||
# Senza ?v= (pagine vecchie) una settimana, come prima.
|
||||
map $arg_v $media_cache {
|
||||
"" "public, max-age=604800";
|
||||
default "public, max-age=31536000, immutable";
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
@@ -30,9 +37,8 @@ server {
|
||||
location ~* \.(css|js|mjs|json)$ {
|
||||
add_header Cache-Control "no-cache";
|
||||
}
|
||||
location ~* \.(png|webp|mp3)$ {
|
||||
expires 7d;
|
||||
add_header Cache-Control "public";
|
||||
location ~* \.(png|webp|mp3|woff2)$ {
|
||||
add_header Cache-Control $media_cache;
|
||||
}
|
||||
location = /index.html {
|
||||
add_header Cache-Control "no-cache";
|
||||
|
||||
Reference in New Issue
Block a user