aboutsummaryrefslogtreecommitdiffstats
path: root/index.ts
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-04-25 09:21:14 -0700
committerAdam Soltys <[email protected]>2026-04-25 09:21:14 -0700
commit669b13189180ea40f73e7202052f04039cfc9dac (patch)
tree7b06d9bedb0d3ebfd1ae4745379b6d739dff7918 /index.ts
parent15b94857f6f917f032968c0d052b1d387cb99cca (diff)
downloadcoinos-server-669b13189180ea40f73e7202052f04039cfc9dac.tar.gz
coinos-server-669b13189180ea40f73e7202052f04039cfc9dac.zip
check listpays before reversing
Diffstat (limited to 'index.ts')
-rw-r--r--index.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/index.ts b/index.ts
index 5a3f172b..78c43598 100644
--- a/index.ts
+++ b/index.ts
@@ -34,7 +34,7 @@ try {
setTimeout(listenForLightning, 2000);
setInterval(ensureListenerAlive, 120000);
-setInterval(sendHeartbeat, 2000);
+setInterval(sendHeartbeat, 5000);
app.get("/balances", info.balances);
app.get("/health", info.health);
@@ -46,7 +46,7 @@ app.get("/rates", rates.index);
app.get("/locations", locations.list);
-app.get("/invoice/:id", invoices.get);
+app.get("/invoice/:id", { config: { rateLimit: { max: 30, timeWindow: 10000, keyGenerator: (req) => { const ip = (req.headers["cf-connecting-ip"] as string) || req.ip; const token = (req.headers.authorization || "").slice(0, 50); return token ? `invoice:${token}` : `invoice:${ip}`; } } } }, invoices.get);
app.get("/invoices", auth, invoices.list);
app.post("/invoice", optional, invoices.create);
app.post("/invoice/:id", optional, invoices.update);