NestJS · Junior · Question 69 of 75
How do you send a custom header from a handler without using @Res()?
- 1By returning
{ headers: ... } - 2It's impossible without
@Res() - ✓Correct answer: With the
@Header('Cache-Control', 'no-store')decorator
Explanation
Related decorators: @HttpCode() for status and @Redirect() for redirects.