From cbaf766c9fd081929b79e8dc2b9d3d50460aa1d0 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 16 Jul 2025 07:06:00 +0000 Subject: log queries --- lib/app.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/app.ts b/lib/app.ts index 1beedcd4..44c50c1e 100644 --- a/lib/app.ts +++ b/lib/app.ts @@ -29,14 +29,16 @@ const resLogger = pino(pino.destination("res")); app.addHook("preHandler", async (req) => { const url = req.raw.url; - const ignore = ["/login","/ws","/me","/confirm","/public"]; - if (req.method === "GET" || ignore.some(path => url.startsWith(path))) return; + const ignore = ["/login","/ws","/me","/confirm","/public","/rates","/challenge", "/rate", "/lnurlp", "/subscriptions", "/accounts", "/contacts", "/users"]; + if (ignore.some(path => url.startsWith(path))) return; reqLogger.info({ method: req.method, url, headers: req.headers, + query: req.query, body: req.body, + user: (req.user as any)?.username, id: req.id }); }); -- cgit v1.2.3