From fef6b29509a51359c60c449f7a12f1f570d09e20 Mon Sep 17 00:00:00 2001 From: Mark van Renswoude Date: Wed, 18 Aug 2021 15:56:54 +0200 Subject: [PATCH] Proxy forwarded IP in logs --- src/routes/api.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/routes/api.js b/src/routes/api.js index d51a519..ac09501 100644 --- a/src/routes/api.js +++ b/src/routes/api.js @@ -155,7 +155,8 @@ class ApiRoutes _logRequestWarning(req, message) { - this.logger.warn(`[${req.ip}] ${message}`); + const ip = this._getIp(req); + this.logger.warn(`[${ip}] ${message}`); }