Add headers endpoint

This commit is contained in:
2024-10-30 10:32:44 -06:00
parent 4bc81484d3
commit 6418bff35c

View File

@@ -1,4 +1,4 @@
import { Controller, Get } from '@nestjs/common';
import { Controller, Get, Req } from '@nestjs/common';
import { AppService } from './app.service';
@Controller()
@@ -9,4 +9,9 @@ export class AppController {
getHello(): string {
return this.appService.getHello();
}
@Get('headers')
getHeaders(@Req() req: Request) {
return req.headers;
}
}