"Cache-Control: public, no-cache" response header is ambiguous as public means the response can be cached. Change this to just "no-cache" This should not have any effect but it's easier to understand like this
120 lines
3.4 KiB
Plaintext
120 lines
3.4 KiB
Plaintext
#lighttpd configuration for tar1090
|
|
|
|
# redirect the slash-less URL
|
|
url.redirect += (
|
|
"^/INSTANCE$" => "/INSTANCE/"
|
|
)
|
|
|
|
alias.url += (
|
|
"/INSTANCE/data/" => "SOURCE_DIR/",
|
|
"/INSTANCE/chunks/" => "/run/SERVICE/",
|
|
"/INSTANCE/globe_history/" => "/var/globe_history/",
|
|
"/INSTANCE/aircraft_sil/" => "/usr/local/share/tar1090/aircraft_sil/",
|
|
"/INSTANCE/osm_tiles_offline/" => "/usr/local/share/osm_tiles_offline/",
|
|
"/INSTANCE/" => "HTMLPATH/"
|
|
)
|
|
|
|
$HTTP["url"] =~ "^/INSTANCE/data/.*\.binCraft$" {
|
|
compress.filetype = ()
|
|
setenv.add-response-header += (
|
|
"Cache-Control" => "no-cache",
|
|
"Content-Encoding" => "gzip",
|
|
)
|
|
}
|
|
$HTTP["url"] =~ "^/INSTANCE/data/.*\.zst$" {
|
|
compress.filetype = ()
|
|
setenv.add-response-header += (
|
|
"Cache-Control" => "no-cache",
|
|
)
|
|
}
|
|
$HTTP["url"] =~ "^/INSTANCE/chunks/chunk_.*gz$" {
|
|
setenv.add-response-header += (
|
|
"Access-Control-Allow-Origin" => "*",
|
|
"Cache-Control" => "public, max-age=1209600",
|
|
"Content-Encoding" => "gzip",
|
|
"Content-Type" => "application/json",
|
|
)
|
|
}
|
|
$HTTP["url"] =~ "^/INSTANCE/chunks/current_.*gz$" {
|
|
setenv.add-response-header += (
|
|
"Access-Control-Allow-Origin" => "*",
|
|
"Cache-Control" => "no-cache",
|
|
"Content-Encoding" => "gzip",
|
|
"Content-Type" => "application/json",
|
|
)
|
|
}
|
|
$HTTP["url"] =~ "^/INSTANCE/chunks/978\.json$" {
|
|
setenv.add-response-header += (
|
|
"Cache-Control" => "no-cache",
|
|
)
|
|
}
|
|
$HTTP["url"] =~ "^/INSTANCE/data/aircraft\.json$" {
|
|
setenv.add-response-header += (
|
|
"Cache-Control" => "no-cache",
|
|
)
|
|
}
|
|
$HTTP["url"] =~ "^/INSTANCE/data/globe.*json$" {
|
|
compress.filetype = ()
|
|
setenv.add-response-header += (
|
|
"Cache-Control" => "no-cache",
|
|
"Content-Encoding" => "gzip",
|
|
)
|
|
}
|
|
$HTTP["url"] =~ "^/INSTANCE/data/traces/" {
|
|
compress.filetype = ()
|
|
setenv.add-response-header += (
|
|
"Cache-Control" => "no-cache",
|
|
"Content-Encoding" => "gzip",
|
|
)
|
|
}
|
|
$HTTP["url"] =~ "^/INSTANCE/globe_history/" {
|
|
compress.filetype = ()
|
|
setenv.add-response-header += (
|
|
"Cache-Control" => "public, max-age=3600",
|
|
"Content-Encoding" => "gzip",
|
|
)
|
|
}
|
|
$HTTP["url"] =~ "^/INSTANCE/images" {
|
|
setenv.add-response-header += (
|
|
"Cache-Control" => "public, max-age=1209600",
|
|
)
|
|
}
|
|
$HTTP["url"] =~ "^/INSTANCE/flags" {
|
|
setenv.add-response-header += (
|
|
"Cache-Control" => "public, max-age=1209600",
|
|
)
|
|
}
|
|
$HTTP["url"] =~ "^/INSTANCE/aircraft_sil" {
|
|
setenv.add-response-header += (
|
|
"Cache-Control" => "public, max-age=1209600",
|
|
)
|
|
}
|
|
|
|
$HTTP["url"] =~ "^/INSTANCE/config.js$" {
|
|
setenv.add-response-header += (
|
|
"Cache-Control" => "no-cache",
|
|
)
|
|
}
|
|
$HTTP["url"] =~ "^/INSTANCE/(?!config)[^/]*\.js$" {
|
|
setenv.add-response-header += (
|
|
"Cache-Control" => "public, max-age=1209600",
|
|
)
|
|
}
|
|
$HTTP["url"] =~ "^/INSTANCE/db-.*\.js$" {
|
|
compress.filetype = ()
|
|
setenv.add-response-header += (
|
|
"Cache-Control" => "public, max-age=1209600",
|
|
"Content-Encoding" => "gzip",
|
|
)
|
|
}
|
|
$HTTP["url"] =~ "^/INSTANCE/libs/.*$" {
|
|
setenv.add-response-header += (
|
|
"Cache-Control" => "public, max-age=1209600",
|
|
)
|
|
}
|
|
$HTTP["url"] =~ "^/INSTANCE/style.css$" {
|
|
setenv.add-response-header += (
|
|
"Cache-Control" => "public, max-age=1209600",
|
|
)
|
|
}
|