-
Notifications
You must be signed in to change notification settings - Fork 243
/
88-tar1090.conf
119 lines (115 loc) · 3.42 KB
/
88-tar1090.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
#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/aircraft_sil/" => "/usr/local/share/tar1090/aircraft_sil/",
"/INSTANCE/osm_tiles_offline/" => "/usr/local/share/osm_tiles_offline/",
"/INSTANCE/" => "HTMLPATH/"
)
$HTTP["url"] =~ "^/INSTANCE/data/.*\.binCraft$" {
compress.filetype = ()
setenv.add-response-header += (
"Cache-Control" => "public, no-cache",
"Content-Encoding" => "gzip",
)
}
$HTTP["url"] =~ "^/INSTANCE/data/.*\.zst$" {
compress.filetype = ()
setenv.add-response-header += (
"Cache-Control" => "public, no-cache",
)
}
$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" => "no-cache",
"Content-Encoding" => "gzip",
"Content-Type" => "application/json",
)
}
$HTTP["url"] =~ "^/INSTANCE/chunks/978\.json$" {
setenv.add-response-header += (
"Cache-Control" => "public, no-cache",
)
}
$HTTP["url"] =~ "^/INSTANCE/data/aircraft\.json$" {
setenv.add-response-header += (
"Cache-Control" => "public, no-cache",
)
}
$HTTP["url"] =~ "^/INSTANCE/data/globe.*json$" {
compress.filetype = ()
setenv.add-response-header += (
"Cache-Control" => "public, no-cache",
"Content-Encoding" => "gzip",
)
}
$HTTP["url"] =~ "^/INSTANCE/data/traces/" {
compress.filetype = ()
setenv.add-response-header += (
"Cache-Control" => "public, no-cache",
"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/images" {
setenv.add-response-header += (
"Cache-Control" => "public, max-age=1209600",
)
}
$HTTP["url"] =~ "^/INSTANCE/flags" {
setenv.add-response-header += (
"Cache-Control" => "public, max-age=1209600",
)
}
$HTTP["url"] =~ "^/INSTANCE/aircraft_sil" {
setenv.add-response-header += (
"Cache-Control" => "public, max-age=1209600",
)
}
$HTTP["url"] =~ "^/INSTANCE/config.js$" {
setenv.add-response-header += (
"Cache-Control" => "no-cache",
)
}
$HTTP["url"] =~ "^/INSTANCE/(?!config)[^/]*\.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/libs/.*$" {
setenv.add-response-header += (
"Cache-Control" => "public, max-age=1209600",
)
}
$HTTP["url"] =~ "^/INSTANCE/style.css$" {
setenv.add-response-header += (
"Cache-Control" => "public, max-age=1209600",
)
}