2020-01-03 21:16:40 +01:00
|
|
|
#lighttpd configuration for tar1090
|
|
|
|
|
|
2020-03-16 15:08:21 +01:00
|
|
|
# redirect the slash-less URL
|
|
|
|
|
url.redirect += (
|
|
|
|
|
"^/INSTANCE$" => "/INSTANCE/"
|
|
|
|
|
)
|
|
|
|
|
|
2020-01-03 21:16:40 +01:00
|
|
|
alias.url += (
|
|
|
|
|
"/INSTANCE/data/" => "SOURCE_DIR/",
|
|
|
|
|
"/INSTANCE/chunks/" => "/run/SERVICE/",
|
2020-06-27 12:59:39 +02:00
|
|
|
"/INSTANCE/globe_history/" => "/var/globe_history/",
|
2021-01-28 18:08:46 +01:00
|
|
|
"/INSTANCE/aircraft_sil/" => "/usr/local/share/tar1090/aircraft_sil/",
|
2022-04-16 06:39:18 +02:00
|
|
|
"/INSTANCE/osm_tiles_offline/" => "/usr/local/share/osm_tiles_offline/",
|
2025-10-06 19:34:22 +00:00
|
|
|
"/INSTANCE/openfreemap_offline/" => "/usr/local/share/openfreemap_offline/mnt/",
|
2020-01-03 21:16:40 +01:00
|
|
|
"/INSTANCE/" => "HTMLPATH/"
|
|
|
|
|
)
|
|
|
|
|
|
2021-07-01 13:43:36 +02:00
|
|
|
$HTTP["url"] =~ "^/INSTANCE/data/.*\.binCraft$" {
|
2022-01-24 11:29:37 +01:00
|
|
|
compress.filetype = ()
|
2021-07-01 13:43:36 +02:00
|
|
|
setenv.add-response-header += (
|
2024-12-13 09:54:53 +00:00
|
|
|
"Cache-Control" => "no-cache",
|
2021-07-01 13:43:36 +02:00
|
|
|
"Content-Encoding" => "gzip",
|
|
|
|
|
)
|
|
|
|
|
}
|
2022-07-08 08:21:47 +02:00
|
|
|
$HTTP["url"] =~ "^/INSTANCE/data/.*\.zst$" {
|
|
|
|
|
compress.filetype = ()
|
|
|
|
|
setenv.add-response-header += (
|
2024-12-13 09:54:53 +00:00
|
|
|
"Cache-Control" => "no-cache",
|
2022-07-08 08:21:47 +02:00
|
|
|
)
|
|
|
|
|
}
|
2020-01-03 21:16:40 +01:00
|
|
|
$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" => "*",
|
2024-05-15 21:41:42 +02:00
|
|
|
"Cache-Control" => "no-cache",
|
2020-01-03 21:16:40 +01:00
|
|
|
"Content-Encoding" => "gzip",
|
|
|
|
|
"Content-Type" => "application/json",
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
$HTTP["url"] =~ "^/INSTANCE/chunks/978\.json$" {
|
|
|
|
|
setenv.add-response-header += (
|
2024-12-13 09:54:53 +00:00
|
|
|
"Cache-Control" => "no-cache",
|
2020-01-03 21:16:40 +01:00
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
$HTTP["url"] =~ "^/INSTANCE/data/aircraft\.json$" {
|
|
|
|
|
setenv.add-response-header += (
|
2024-12-13 09:54:53 +00:00
|
|
|
"Cache-Control" => "no-cache",
|
2020-01-03 21:16:40 +01:00
|
|
|
)
|
|
|
|
|
}
|
2022-08-01 19:48:58 +02:00
|
|
|
$HTTP["url"] =~ "^/INSTANCE/data/globe.*json$" {
|
2020-10-22 19:56:09 +02:00
|
|
|
compress.filetype = ()
|
2020-01-03 21:16:40 +01:00
|
|
|
setenv.add-response-header += (
|
2024-12-13 09:54:53 +00:00
|
|
|
"Cache-Control" => "no-cache",
|
2020-03-16 15:08:21 +01:00
|
|
|
"Content-Encoding" => "gzip",
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
$HTTP["url"] =~ "^/INSTANCE/data/traces/" {
|
2020-10-22 19:56:09 +02:00
|
|
|
compress.filetype = ()
|
2020-03-16 15:08:21 +01:00
|
|
|
setenv.add-response-header += (
|
2024-12-13 09:54:53 +00:00
|
|
|
"Cache-Control" => "no-cache",
|
2020-03-16 15:08:21 +01:00
|
|
|
"Content-Encoding" => "gzip",
|
2020-01-03 21:16:40 +01:00
|
|
|
)
|
|
|
|
|
}
|
2020-06-27 12:59:39 +02:00
|
|
|
$HTTP["url"] =~ "^/INSTANCE/globe_history/" {
|
2020-10-22 19:56:09 +02:00
|
|
|
compress.filetype = ()
|
2020-06-26 02:47:22 +02:00
|
|
|
setenv.add-response-header += (
|
2020-06-27 12:59:39 +02:00
|
|
|
"Cache-Control" => "public, max-age=3600",
|
2020-06-26 02:47:22 +02:00
|
|
|
"Content-Encoding" => "gzip",
|
|
|
|
|
)
|
|
|
|
|
}
|
2020-10-24 09:44:16 +02:00
|
|
|
$HTTP["url"] =~ "^/INSTANCE/images" {
|
2020-01-03 21:16:40 +01:00
|
|
|
setenv.add-response-header += (
|
2020-10-24 09:44:16 +02:00
|
|
|
"Cache-Control" => "public, max-age=1209600",
|
|
|
|
|
)
|
|
|
|
|
}
|
2023-11-28 11:47:20 -05:00
|
|
|
$HTTP["url"] =~ "^/INSTANCE/flags" {
|
2020-10-24 09:44:16 +02:00
|
|
|
setenv.add-response-header += (
|
|
|
|
|
"Cache-Control" => "public, max-age=1209600",
|
2020-01-03 21:16:40 +01:00
|
|
|
)
|
|
|
|
|
}
|
2021-01-28 18:08:46 +01:00
|
|
|
$HTTP["url"] =~ "^/INSTANCE/aircraft_sil" {
|
|
|
|
|
setenv.add-response-header += (
|
|
|
|
|
"Cache-Control" => "public, max-age=1209600",
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
2020-06-01 20:34:12 +02:00
|
|
|
$HTTP["url"] =~ "^/INSTANCE/config.js$" {
|
|
|
|
|
setenv.add-response-header += (
|
2024-05-15 21:41:42 +02:00
|
|
|
"Cache-Control" => "no-cache",
|
2020-06-01 20:34:12 +02:00
|
|
|
)
|
|
|
|
|
}
|
2020-10-24 08:39:04 +02:00
|
|
|
$HTTP["url"] =~ "^/INSTANCE/(?!config)[^/]*\.js$" {
|
2020-01-03 21:16:40 +01:00
|
|
|
setenv.add-response-header += (
|
|
|
|
|
"Cache-Control" => "public, max-age=1209600",
|
|
|
|
|
)
|
|
|
|
|
}
|
2020-10-22 19:56:09 +02:00
|
|
|
$HTTP["url"] =~ "^/INSTANCE/db-.*\.js$" {
|
|
|
|
|
compress.filetype = ()
|
|
|
|
|
setenv.add-response-header += (
|
|
|
|
|
"Cache-Control" => "public, max-age=1209600",
|
|
|
|
|
"Content-Encoding" => "gzip",
|
|
|
|
|
)
|
|
|
|
|
}
|
2022-01-24 11:29:37 +01:00
|
|
|
$HTTP["url"] =~ "^/INSTANCE/libs/.*$" {
|
2020-06-01 20:34:12 +02:00
|
|
|
setenv.add-response-header += (
|
|
|
|
|
"Cache-Control" => "public, max-age=1209600",
|
2020-01-03 21:16:40 +01:00
|
|
|
)
|
|
|
|
|
}
|
2025-10-06 19:34:22 +00:00
|
|
|
$HTTP["url"] =~ "^/INSTANCE/openfreemap_offline/tiles" {
|
|
|
|
|
setenv.add-response-header += (
|
|
|
|
|
"Content-Encoding" => "gzip",
|
|
|
|
|
)
|
|
|
|
|
}
|
2022-01-24 11:29:37 +01:00
|
|
|
$HTTP["url"] =~ "^/INSTANCE/style.css$" {
|
2020-01-03 21:16:40 +01:00
|
|
|
setenv.add-response-header += (
|
|
|
|
|
"Cache-Control" => "public, max-age=1209600",
|
|
|
|
|
)
|
|
|
|
|
}
|