aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/app.ts19
1 files changed, 0 insertions, 19 deletions
diff --git a/lib/app.ts b/lib/app.ts
index faf3d9bd..b2c3c1a7 100644
--- a/lib/app.ts
+++ b/lib/app.ts
@@ -21,7 +21,6 @@ const app = fastify({
});
const reqLogger = pino(pino.destination("req"));
-const resLogger = pino(pino.destination("res"));
// Never log plaintext credentials. This MUST recurse: the previous version
// only redacted top-level keys, but POST /register posts {user:{password}} —
@@ -136,24 +135,6 @@ app.addHook("preHandler", async (req) => {
});
});
-app.addHook("onResponse", async (req, reply) => {
- const rawCookies = req.raw.headers.cookie || "";
-
- const cookies: any = rawCookies.split(";").reduce((acc, cookie) => {
- const [key, value] = cookie.split("=").map((s) => s.trim());
- if (key && value) acc[key] = value;
- return acc;
- }, {});
-
- resLogger.info({
- id: req.id,
- url: req.raw.url,
- statusCode: reply.raw.statusCode,
- durationMs: reply.elapsedTime,
- username: cookies.username,
- });
-});
-
app.register(fastifyRateLimit, {
allowList: (req) => req.raw.url?.includes("public"),
max: 2000,