fix(security): redact Bearer tokens from server log output

Pino logged full Authorization headers in plaintext to server.log,
exposing JWT tokens to any process with filesystem read access.
Add redact paths so Bearer values appear as [Redacted] in log output.

Closes #2385
This commit is contained in:
plind-dm committed 2026-04-03 23:50:45 +09:00
1 parent ca8d35fd99
commit 2af64b6068
1 file changed
+1
+1
View File
@@ -28,6 +28,7 @@ const sharedOpts = {
export const logger = pino({
level: "debug",
redact: ["req.headers.authorization", "req.headers[\"authorization\"]"],
}, pino.transport({
targets: [
{