From ada39fcb85a7fd88965e761e2b674ffaef48d12c Mon Sep 17 00:00:00 2001 From: Artur Sudnik-Hrynkiewicz Date: Tue, 17 Oct 2023 11:47:47 +0200 Subject: [PATCH] feat: using `req.ip` instead of `req.socket.remoteAddress` --- apps/vc-api/src/middlewares/http-logger.middleware.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/vc-api/src/middlewares/http-logger.middleware.ts b/apps/vc-api/src/middlewares/http-logger.middleware.ts index 0b687ca..055a827 100644 --- a/apps/vc-api/src/middlewares/http-logger.middleware.ts +++ b/apps/vc-api/src/middlewares/http-logger.middleware.ts @@ -13,7 +13,7 @@ export class HttpLoggerMiddleware implements NestMiddleware { let finished = false; res.on('finish', () => { - const message = `${res.statusCode} ${res.statusMessage} | [${method}] ${url} - ${ + const message = `${res.statusCode} ${res.statusMessage} | ${req.ip} | [${method}] ${url} - ${ Date.now() - requestStarted }ms`;