リクエストのIPをログに出力して確認する

This commit is contained in:
saito.k 2023-12-06 19:06:26 +09:00
parent d92cb1d28b
commit 2d0697f56b

View File

@ -4,6 +4,7 @@ import {
Get,
HttpException,
HttpStatus,
Ip,
Post,
Query,
Req,
@ -136,6 +137,9 @@ export class UsersController {
@Get()
async getUsers(@Req() req: Request): Promise<GetUsersResponse> {
const accessToken = retrieveAuthorizationToken(req);
console.log(req.ip);
console.log(req.headers['X-Forwarded-For']);
if (!accessToken) {
throw new HttpException(
makeErrorResponse('E000107'),