98 lines
2.7 KiB
Plaintext
98 lines
2.7 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/" => "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/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/spinny.gif$" {
|
|
setenv.add-response-header += (
|
|
"Cache-Control" => "public, max-age=1209600",
|
|
)
|
|
}
|
|
$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",
|
|
)
|
|
}
|