add configuration snip to allow installation in webroot

This commit is contained in:
Matthias Wirth
2019-08-06 14:36:11 +02:00
parent 3568fc9035
commit 8279c4e3f2
3 changed files with 19 additions and 2 deletions

15
99-tar1090-webroot.conf Normal file
View File

@@ -0,0 +1,15 @@
# serve tar1090 directly at / the web server root
alias.url += (
"/data/" => "/run/dump1090-fa/",
"/chunks/" => "/run/tar1090/",
"/" => "/usr/local/share/tar1090/html/",
)
$HTTP["url"] =~ "^/chunks/chunk_.*gz$" {
setenv.add-response-header += (
"Access-Control-Allow-Origin" => "*",
"Cache-Control" => "must-revalidate",
"Content-Encoding" => "gzip",
"Content-Type" => "application/json",
)
}

View File

@@ -264,10 +264,10 @@ PlaneObject.prototype.updateTrack = function(receiver_timestamp, last_timestamp)
if (
lastseg.ground != on_ground
|| (!on_ground && isNaN(alt_change))
|| (alt_change > 900 && this.altitude > 25000)
|| (alt_change > 700 && this.altitude <= 25000 && this.altitude > 9000)
|| (alt_change > 700 && this.altitude > 9000)
|| (alt_change > 500 && this.altitude <= 9000 && this.altitude > 4500)
|| (alt_change > 250 && this.altitude <= 4500)
|| (alt_change > 175 && this.altitude <= 2000)
) {
// Create a new segment as the ground state or the altitude changed.
// The new state is only drawn after the state has changed

View File

@@ -13,6 +13,8 @@ rm -f /lib/systemd/system/tar1090.service
rm -f /etc/lighttpd/conf-available/88-tar1090.conf
rm -f /etc/lighttpd/conf-enabled/88-tar1090.conf
rm -f /etc/lighttpd/conf-available/99-tar1090-webroot.conf
rm -f /etc/lighttpd/conf-enabled/99-tar1090-webroot.conf
systemctl daemon-reload