Files
tar1090/88-tar1090.conf

87 lines
2.4 KiB
Plaintext

#lighttpd configuration for tar1090
alias.url += (
"/INSTANCE/data/" => "SOURCE_DIR/",
"/INSTANCE/chunks/" => "/run/SERVICE/",
"/INSTANCE/" => "HTMLPATH/"
)
# redirect the slash-less URL
url.redirect += (
"^/INSTANCE$" => "/INSTANCE/"
)
$HTTP["url"] =~ "^/INSTANCE/traces/" {
setenv.add-response-header += (
"Cache-Control" => "public, max-age=10",
"Content-Encoding" => "gzip",
"Content-Type" => "application/json",
)
}
$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_.*\.json$" {
setenv.add-response-header += (
"Cache-Control" => "public, max-age=0",
)
}
$HTTP["url"] =~ "^/INSTANCE/data/icao_.*\.json$" {
setenv.add-response-header += (
"Cache-Control" => "public, max-age=10",
)
}
$HTTP["url"] =~ "^/INSTANCE/db2/.*\.json$" {
setenv.add-response-header += (
"Cache-Control" => "public, max-age=100000",
)
}
$HTTP["url"] =~ "^/INSTANCE/.*\.png$" {
setenv.add-response-header += (
"Cache-Control" => "public, max-age=2419200",
)
}
$HTTP["url"] =~ "^/INSTANCE/spinny.gif$" {
setenv.add-response-header += (
"Cache-Control" => "public, max-age=1209600",
)
}
$HTTP["url"] =~ "^/INSTANCE/.*\.js$" {
setenv.add-response-header += (
"Cache-Control" => "public, max-age=1209600",
)
}
$HTTP["url"] =~ "^/INSTANCE/config.js$" {
setenv.add-response-header += (
"Cache-Control" => "must-revalidate",
)
}
$HTTP["url"] =~ "^/INSTANCE/.*\.css$" {
setenv.add-response-header += (
"Cache-Control" => "public, max-age=1209600",
)
}