aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-08-27 09:01:45 -0700
committerAdam Soltys <[email protected]>2026-08-27 09:01:45 -0700
commit01636561aa58b031ac01bdc9a5779ace35040389 (patch)
treead9e68c6f80bd5e0a8b03b17b5d5e0b56ab3f463 /lib
parentbe1f54473273a97d5201948433a53216da26398f (diff)
downloadcoinos-server-01636561aa58b031ac01bdc9a5779ace35040389.tar.gz
coinos-server-01636561aa58b031ac01bdc9a5779ace35040389.zip
harden: remove debug /echo endpoint; widen LN health probe timeout
Remove the unauthenticated POST /echo route — a request-body reflector with no place in production; it served only to echo attacker probe payloads. Raise the health-check listener-backlog probe timeout from 5s to 15s. The waitanyinvoice probe normally returns in ~1s but can intermittently take ~8s while lightningd is briefly busy; the 5s cap turned those transient spikes into health-check failures (and, at 3 consecutive, an unnecessary process exit / container restart). 15s absorbs the busy spikes while a genuinely wedged RPC still fails the check. Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01DKkev76U4YRnRAqM6jqbae
Diffstat (limited to 'lib')
-rw-r--r--lib/health.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/health.ts b/lib/health.ts
index bb05b0db..96d15030 100644
--- a/lib/health.ts
+++ b/lib/health.ts
@@ -93,7 +93,7 @@ async function checkLightningHealth(): Promise<boolean> {
try {
const waiting = await withTimeout(
ln.waitanyinvoice(payIndex, 1),
- 5_000,
+ 15_000,
"listener backlog probe",
);
if (Number(waiting?.pay_index) > payIndex) {