fix: sanitize proxy failures and default CCTV launcher to loopback

This commit is contained in:
Tom-Neverwinter authored and Sameh Khamis committed 2026-09-10 22:54:50 -07:00
1 parent a458d27067
commit 8fc86e0780
2 files changed
+6 -5

No files matched your search

+2 -1
View File
@@ -5,7 +5,8 @@ ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "$ROOT_DIR"
PORT="${PORT:-4173}"
HOST="${HOST:-0.0.0.0}"
# Local-only by default; set HOST=0.0.0.0 explicitly to expose on the LAN.
HOST="${HOST:-localhost}"
CCTV_SOURCES_FILE="${CCTV_SOURCES_FILE:-config/cctv_sources.austin.json}"
CCTV_PREFER_AUSTIN="${CCTV_PREFER_AUSTIN:-1}"
CCTV_AUSTIN_MAX_SOURCES="${CCTV_AUSTIN_MAX_SOURCES:-36}"
+4 -4
View File
@@ -1645,7 +1645,7 @@ function celestrakProxy() {
send(502, 'celestrak fetch failed and no cache available', 'NONE');
}
} catch (err) {
send(500, `celestrak proxy error: ${err?.message || err}`, 'ERROR');
send(500, 'celestrak proxy error', 'ERROR');
}
});
},
@@ -1758,7 +1758,7 @@ function rocketLaunchesProxy() {
send(
res,
Number.isInteger(error?.upstreamStatus) ? error.upstreamStatus : 502,
error?.upstreamBody || JSON.stringify({ error: 'Launch Library 2 unavailable' }),
JSON.stringify({ error: 'Launch Library 2 unavailable' }),
'NONE',
);
}
@@ -2373,7 +2373,7 @@ function terrainHeightsProxy() {
}
send(outcome.status, outcome.body);
} catch (err) {
send(500, { error: `terrain heights proxy error: ${err?.message || err}` });
send(500, { error: 'terrain heights proxy error' });
}
});
},
@@ -2494,7 +2494,7 @@ function adsbdbProxy() {
}
return send(404, { error: 'unknown endpoint' });
} catch (err) {
return send(500, { error: String(err?.message || err) });
return send(500, { error: 'adsbdb proxy error' });
}
});
},