diff --git a/arm-gnueabihf/packages/lighttpd/etc/lighttpd/conf.d/headers.conf b/arm-gnueabihf/packages/lighttpd/etc/lighttpd/conf.d/headers.conf new file mode 100644 index 00000000..a13ee17e --- /dev/null +++ b/arm-gnueabihf/packages/lighttpd/etc/lighttpd/conf.d/headers.conf @@ -0,0 +1,7 @@ +# Avoid aggressive caching of JS and CSS. Max-Age is for Firefox that ignores the must-revalidate +$HTTP["url"] =~ "^/webui/.*\.(js)|(css).*" { + setenv.add-response-header += ( + "Cache-Control" => "public, must-revalidate, max-age=30" + ) +} + diff --git a/arm-gnueabihf/packages/lighttpd/etc/lighttpd/lighttpd.conf b/arm-gnueabihf/packages/lighttpd/etc/lighttpd/lighttpd.conf index 145aeff7..118f02d5 100755 --- a/arm-gnueabihf/packages/lighttpd/etc/lighttpd/lighttpd.conf +++ b/arm-gnueabihf/packages/lighttpd/etc/lighttpd/lighttpd.conf @@ -157,6 +157,12 @@ include "conf.d/access_log.conf" ## include "conf.d/debug.conf" +## +## The header options are moved into their own file. +## see conf.d/headers.conf for various options for additional response headers. +## +include "conf.d/headers.conf" + ## ####################################################################### diff --git a/arm-gnueabihf/packages/lighttpd/etc/lighttpd/lighttpd_ssl.conf b/arm-gnueabihf/packages/lighttpd/etc/lighttpd/lighttpd_ssl.conf index d65b6ef5..54da9ea3 100755 --- a/arm-gnueabihf/packages/lighttpd/etc/lighttpd/lighttpd_ssl.conf +++ b/arm-gnueabihf/packages/lighttpd/etc/lighttpd/lighttpd_ssl.conf @@ -157,6 +157,12 @@ include "conf.d/access_log.conf" ## include "conf.d/debug.conf" +## +## The header options are moved into their own file. +## see conf.d/headers.conf for various options for additional response headers. +## +include "conf.d/headers.conf" + ## #######################################################################