diff options
| author | Adam Soltys <[email protected]> | 2025-07-16 07:06:00 +0000 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2025-07-16 07:06:01 +0000 |
| commit | cbaf766c9fd081929b79e8dc2b9d3d50460aa1d0 (patch) | |
| tree | 6598c3dcc2edd2cf4b1182084c724b8c8252dbfd /lib/app.ts | |
| parent | 428fb7d17e393304641a9438500faecd8775672a (diff) | |
| download | coinos-server-cbaf766c9fd081929b79e8dc2b9d3d50460aa1d0.tar.gz coinos-server-cbaf766c9fd081929b79e8dc2b9d3d50460aa1d0.zip | |
log queries
Diffstat (limited to 'lib/app.ts')
| -rw-r--r-- | lib/app.ts | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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 }); }); |
