NestJS · Middle · Question 64 of 75
How do you set security headers in a Nest app?
- 1Headers are secure by default
- ✓Correct answer: With
helmet(app.use(helmet()), or@fastify/helmetfor Fastify) - 3With
ValidationPipe
Explanation
Register Helmet before other middleware or routes so its headers apply to every response.