Use /data for 1090 directory to avoid breaking exisiting tools like dump1090exporter that may be looking there

This commit is contained in:
eric1tran 2021-02-25 06:00:43 +00:00
parent 74b1a39aa0
commit e23cd7e73b
2 changed files with 6 additions and 6 deletions

View File

@ -21,7 +21,7 @@
# server.modules += ( "mod_alias" )
alias.url += (
"/skyaware/data-1090/" => "/run/dump1090-fa/",
"/skyaware/data/" => "/run/dump1090-fa/",
"/skyaware/data-978/" => "/run/skyaware978/",
"/skyaware/" => "/usr/share/dump1090-fa/html/"
)
@ -36,7 +36,7 @@ url.redirect += (
# Listen on port 8080 and serve the map there, too.
$SERVER["socket"] == ":8080" {
alias.url += (
"/data-1090/" => "/run/dump1090-fa/",
"/data/" => "/run/dump1090-fa/",
"/data-978/" => "/run/skyaware978/",
"/" => "/usr/share/dump1090-fa/html/"
)

View File

@ -200,7 +200,7 @@ function fetchData() {
return;
}
FetchPending = $.ajax({ url: 'data-1090/aircraft.json',
FetchPending = $.ajax({ url: 'data/aircraft.json',
timeout: 5000,
cache: false,
dataType: 'json' });
@ -501,7 +501,7 @@ function initialize() {
// Get receiver metadata, reconfigure using it, then continue
// with initialization
$.ajax({ url: 'data-1090/receiver.json',
$.ajax({ url: 'data/receiver.json',
timeout: 5000,
cache: false,
dataType: 'json' })
@ -647,7 +647,7 @@ function start_load_history() {
console.log("Starting to load history (" + TotalPositionHistorySize + " items)");
// Load dump1090 history.json files
for (var i = 0; i < PositionHistorySize; i++) {
load_history_item(i, 'data-1090');
load_history_item(i, 'data');
CurrentHistoryFetch++;
}
// Load skyaware978 history.json files
@ -675,7 +675,7 @@ function load_history_item(i, source) {
dataType: 'json' })
.done(function(data) {
// Tag history.json files with the source we fetched from (data-1090 / data-978)
// Tag history.json files with the source we fetched from (/data or /data-978)
data["source"] = receiver_source;
PositionHistoryBuffer.push(data);
HistoryItemsReturned++;