paperclip/server/src/middleware/http-log-redaction.ts

14 lines
513 B
TypeScript

export const HTTP_LOG_REDACT_PATHS = [
"req.headers.authorization",
'req.headers["proxy-authorization"]',
"req.headers.cookie",
// "set-cookie" is normally a response header; keep the request-side
// path as defensive coverage in case a proxy forwards it inbound.
'req.headers["set-cookie"]',
'res.headers["set-cookie"]',
// Credential- and session-paired headers with no debugging value.
'req.headers["x-csrf-token"]',
'req.headers["x-xsrf-token"]',
'req.headers["x-api-key"]',
] as const;