Files
tar1090/88-tar1090.conf
Vlad Kirienko 35841d05c9 Cleanup (#57)
2020-07-24 15:09:08 +02:00

100 lines
2.8 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/" => "HTMLPATH/"
)
$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" => "public, max-age=0",
"Content-Encoding" => "gzip",
"Content-Type" => "application/json",
)
}
$HTTP["url"] =~ "^/INSTANCE/chunks/978\.json$" {
setenv.add-response-header += (
"Cache-Control" => "public, max-age=0",
)
}
$HTTP["url"] =~ "^/INSTANCE/data/aircraft\.json$" {
setenv.add-response-header += (
"Cache-Control" => "public, max-age=0",
)
}
$HTTP["url"] =~ "^/INSTANCE/data/globe_.*" {
setenv.add-response-header += (
"Cache-Control" => "public, max-age=0",
"Content-Encoding" => "gzip",
)
}
$HTTP["url"] =~ "^/INSTANCE/data/traces/" {
setenv.add-response-header += (
"Cache-Control" => "public, max-age=10",
"Content-Encoding" => "gzip",
)
}
$HTTP["url"] =~ "^/INSTANCE/globe_history/" {
setenv.add-response-header += (
"Cache-Control" => "public, max-age=3600",
"Content-Encoding" => "gzip",
)
}
$HTTP["url"] =~ "^/INSTANCE/data/icao_.*\.json$" {
setenv.add-response-header += (
"Cache-Control" => "public, max-age=10",
)
}
$HTTP["url"] =~ "^/INSTANCE/db.*\.json$" {
setenv.add-response-header += (
"Cache-Control" => "public, max-age=1209600",
)
}
$HTTP["url"] =~ "^/INSTANCE/.*\.png$" {
setenv.add-response-header += (
"Cache-Control" => "public, max-age=2419200",
)
}
$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/ol/.*$" {
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$" {
setenv.add-response-header += (
"Cache-Control" => "public, max-age=1209600",
)
}