NestJS · Senior · Question 43 of 75
Why should secrets not be logged by Nest's default exception or request logging?
- 1Logs are always encrypted
- ✓Correct answer: Request bodies and headers can contain passwords and tokens; redact them in the logger configuration
- 3Nest never logs request data
Explanation
Pino's redact option removes paths like req.headers.authorization before writing logs.