Skip to content

Commit

Permalink
Update logger.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
TrinitroToluen0 committed Sep 23, 2024
1 parent 58187a2 commit dafb70f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/middlewares/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default (req: Request, res: Response, next: NextFunction) => {
const duration = Date.now() - start;
let message = `${req.method} ${req.originalUrl} ${res.statusCode} ${duration}ms `;
if (!DEV_MODE) {
message += req.socket.remoteAddress || req.headers["x-forwarded-for"];
message += req.ip || req.headers["x-forwarded-for"];
}
logger.http(message);
});
Expand Down

0 comments on commit dafb70f

Please sign in to comment.