title: How can I set a header field in a response with NestJS?
body: <p>I'm trying:</p>
  
  <pre><code>    @Post('login')
      async login(@Body() body: AuthDto, @Res() res: Response) {
          const loginResponse = await this.authService.login(body);
          console.log('loginResponse', loginResponse)
          res.headers.set('x-access-token', loginResponse.access_token)
          return loginResponse
      }
  </code></pre>
  
  <p>but no dice. I get an error:</p>
  
  <pre><code>TypeError: Cannot read property 'set' of undefined
  </code></pre>