dump1090/debian/lighttpd/89-dump1090-fa.conf
Oliver Jowett c144507471 Actually serve data on 8080, not just a redirect.
(This is not ideal but plenty of people seem to be confused by the
redirect and how it interacts with NAT)
2016-09-22 16:49:45 +01:00

28 lines
774 B
Plaintext

# Allows access to the static files that provide the dump1090 map view,
# and also to the dynamically-generated json parts that contain aircraft
# data and are periodically written by the dump1090 daemon.
alias.url += (
"/dump1090-fa/data/" => "/run/dump1090-fa/",
"/dump1090-fa/" => "/usr/share/dump1090-fa/html/"
)
# redirect the slash-less URL
url.redirect += (
"^/dump1090-fa$" => "/dump1090-fa/"
)
# Listen on port 8080 and serve the map there, too.
$SERVER["socket"] == ":8080" {
alias.url += (
"/data/" => "/run/dump1090-fa/",
"/" => "/usr/share/dump1090-fa/html/"
)
}
# Add CORS header
server.modules += ( "mod_setenv" )
$HTTP["url"] =~ "^/dump1090-fa/data/.*\.json$" {
setenv.add-response-header = ( "Access-Control-Allow-Origin" => "*" )
}