2014-12-06 22:47:46 +01:00
|
|
|
# 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 += (
|
2016-01-13 01:00:08 +01:00
|
|
|
"/dump1090-fa/data/" => "/run/dump1090-fa/",
|
|
|
|
"/dump1090-fa/" => "/usr/share/dump1090-fa/html/"
|
2014-12-06 22:47:46 +01:00
|
|
|
)
|
2015-01-07 20:01:56 +01:00
|
|
|
|
2016-09-22 17:49:23 +02:00
|
|
|
# redirect the slash-less URL
|
|
|
|
url.redirect += (
|
|
|
|
"^/dump1090-fa$" => "/dump1090-fa/"
|
|
|
|
)
|
|
|
|
|
2016-09-22 17:49:45 +02:00
|
|
|
# Listen on port 8080 and serve the map there, too.
|
2016-04-11 12:58:51 +02:00
|
|
|
$SERVER["socket"] == ":8080" {
|
2016-09-22 17:49:45 +02:00
|
|
|
alias.url += (
|
|
|
|
"/data/" => "/run/dump1090-fa/",
|
|
|
|
"/" => "/usr/share/dump1090-fa/html/"
|
|
|
|
)
|
2016-04-11 12:58:51 +02:00
|
|
|
}
|
2016-07-10 16:26:44 +02:00
|
|
|
|
|
|
|
# Add CORS header
|
|
|
|
server.modules += ( "mod_setenv" )
|
|
|
|
$HTTP["url"] =~ "^/dump1090-fa/data/.*\.json$" {
|
|
|
|
setenv.add-response-header = ( "Access-Control-Allow-Origin" => "*" )
|
|
|
|
}
|