diff --git a/88-tar1090.conf b/88-tar1090.conf index e9b5773..b90f09a 100644 --- a/88-tar1090.conf +++ b/88-tar1090.conf @@ -14,7 +14,7 @@ alias.url += ( ) $HTTP["url"] =~ "^/INSTANCE/data/.*\.binCraft$" { - compress.filetype = () + compress.filetype = () setenv.add-response-header += ( "Cache-Control" => "no-cache", "Content-Encoding" => "gzip", @@ -100,17 +100,12 @@ $HTTP["url"] =~ "^/INSTANCE/db-.*\.js$" { "Content-Encoding" => "gzip", ) } -$HTTP["url"] =~ "^/INSTANCE/ol/.*$" { +$HTTP["url"] =~ "^/INSTANCE/libs/.*$" { setenv.add-response-header += ( "Cache-Control" => "public, max-age=1209600", ) } -$HTTP["url"] =~ "^/INSTANCE/jquery/.*$" { - setenv.add-response-header += ( - "Cache-Control" => "public, max-age=1209600", - ) -} -$HTTP["url"] =~ "^/INSTANCE/.*\.css$" { +$HTTP["url"] =~ "^/INSTANCE/style.css$" { setenv.add-response-header += ( "Cache-Control" => "public, max-age=1209600", ) diff --git a/nginx.conf b/nginx.conf index 4c3a0d8..02e2109 100644 --- a/nginx.conf +++ b/nginx.conf @@ -92,7 +92,7 @@ location /INSTANCE { gzip off; gzip_static off; - location ~ db-.*\.js$ { + location ~ ^/INSTANCE/db-.*\.js$ { gzip off; gzip_static off; add_header Cache-Control "public, max-age=7776000"; @@ -104,25 +104,27 @@ location /INSTANCE { location /INSTANCE/flags-tiny { add_header Cache-Control "public, max-age=7776000"; } - location ~ .*\.gif$ { - add_header Cache-Control "public, max-age=7776000"; - } - location ~ index.html$ { - add_header Cache-Control "public, max-age=300"; + location /INSTANCE/index.html { + add_header Cache-Control "public, max-age=0"; gzip on; gzip_static on; } - location ~ config.js$ { - add_header Cache-Control "public, max-age=10"; + location /INSTANCE/config.js { + add_header Cache-Control "public, max-age=0"; gzip on; gzip_static on; } - location ~ .*\.js$ { + location ~ ^/INSTANCE/libs/.*$ { add_header Cache-Control "public, max-age=7776000"; gzip on; gzip_static on; } - location ~ .*\.css$ { + location ~ ^/INSTANCE/[^/]*\.js$ { + add_header Cache-Control "public, max-age=7776000"; + gzip on; + gzip_static on; + } + location ~ ^/INSTANCE/style.css$ { add_header Cache-Control "public, max-age=7776000"; gzip on; gzip_static on;