Skip to content

Commit

Permalink
feat: adding a client ip address to the access log
Browse files Browse the repository at this point in the history
  • Loading branch information
artursudnik committed Oct 17, 2023
1 parent ae1e3b3 commit 8c34b8e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/vc-api/src/middlewares/http-logger.middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ export class HttpLoggerMiddleware implements NestMiddleware {
let finished = false;

res.on('finish', () => {
const message = `${res.statusCode} ${res.statusMessage} | [${method}] ${url} - ${
Date.now() - requestStarted
}ms`;
const message = `${res.statusCode} ${res.statusMessage} | ${
req.socket.remoteAddress
} | [${method}] ${url} - ${Date.now() - requestStarted}ms`;

finished = true;

Expand Down

0 comments on commit 8c34b8e

Please sign in to comment.