precompress database files in tar1090-db
load regCache as a json rather than constructing it from the database
This commit is contained in:
@@ -39,33 +39,26 @@ $HTTP["url"] =~ "^/INSTANCE/data/aircraft\.json$" {
|
||||
)
|
||||
}
|
||||
$HTTP["url"] =~ "^/INSTANCE/data/globe_.*" {
|
||||
compress.filetype = ()
|
||||
setenv.add-response-header += (
|
||||
"Cache-Control" => "public, max-age=0",
|
||||
"Content-Encoding" => "gzip",
|
||||
)
|
||||
}
|
||||
$HTTP["url"] =~ "^/INSTANCE/data/traces/" {
|
||||
compress.filetype = ()
|
||||
setenv.add-response-header += (
|
||||
"Cache-Control" => "public, max-age=10",
|
||||
"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/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",
|
||||
@@ -76,12 +69,18 @@ $HTTP["url"] =~ "^/INSTANCE/config.js$" {
|
||||
"Cache-Control" => "public, must-revalidate",
|
||||
)
|
||||
}
|
||||
|
||||
$HTTP["url"] =~ "^/INSTANCE/.*_.*\.js$" {
|
||||
$HTTP["url"] =~ "^/INSTANCE/[^/]*\.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/ol/.*$" {
|
||||
setenv.add-response-header += (
|
||||
"Cache-Control" => "public, max-age=1209600",
|
||||
|
||||
Reference in New Issue
Block a user