From 170d27654a3886332780ffcdbc85dda851b0a1c7 Mon Sep 17 00:00:00 2001 From: Matthias Wirth Date: Mon, 1 Jun 2020 20:34:12 +0200 Subject: [PATCH] caching stuff for lighttpd and config.js --- 88-tar1090.conf | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/88-tar1090.conf b/88-tar1090.conf index 126a78d..bf545af 100644 --- a/88-tar1090.conf +++ b/88-tar1090.conf @@ -69,14 +69,25 @@ $HTTP["url"] =~ "^/INSTANCE/spinny.gif$" { "Cache-Control" => "public, max-age=1209600", ) } -$HTTP["url"] =~ "^/INSTANCE/.*\.js$" { +$HTTP["url"] =~ "^/INSTANCE/config.js$" { + setenv.add-response-header += ( + "Cache-Control" => "public, must-revalidate", + ) +} + +$HTTP["url"] =~ "^/INSTANCE/.*_.*\.js$" { setenv.add-response-header += ( "Cache-Control" => "public, max-age=1209600", ) } -$HTTP["url"] =~ "^/INSTANCE/config.js$" { +$HTTP["url"] =~ "^/INSTANCE/ol/.*$" { setenv.add-response-header += ( - "Cache-Control" => "must-revalidate", + "Cache-Control" => "public, max-age=1209600", + ) +} +$HTTP["url"] =~ "^/INSTANCE/jquery/.*$" { + setenv.add-response-header += ( + "Cache-Control" => "public, max-age=1209600", ) } $HTTP["url"] =~ "^/INSTANCE/.*\.css$" {