diff options
Diffstat (limited to 'index.ts')
| -rw-r--r-- | index.ts | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -91,6 +91,20 @@ app.post("/send/:lnaddress/:amount", auth, payments.lnaddress); app.post("/send", auth, payments.internal); app.post("/replace", auth, payments.replace); app.get("/decode/:bolt11", payments.decode); +app.post( + "/lightning/quote", + { + ...auth, + config: { + rateLimit: { + max: 20, + timeWindow: 10000, + keyGenerator: (req) => `lnquote:${(req.headers.authorization || "").slice(0, 50) || (req.headers["cf-connecting-ip"] as string) || req.ip}`, + }, + }, + }, + payments.quote, +); app.get("/offer", auth, payments.offer); app.post("/fetchinvoice", payments.fetchinvoice); |
