From cd28643604112e4b02704d1fd3c063e86964f022 Mon Sep 17 00:00:00 2001 From: muxator Date: Tue, 14 Apr 2020 01:10:19 +0200 Subject: [PATCH] express: document the effect of settings.trustProxy --- src/node/hooks/express.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/node/hooks/express.js b/src/node/hooks/express.js index c755dd84c..7ff7d4ffc 100644 --- a/src/node/hooks/express.js +++ b/src/node/hooks/express.js @@ -100,6 +100,12 @@ exports.restartServer = function () { }); if (settings.trustProxy) { + /* + * If 'trust proxy' === true, the client’s IP address in req.ip will be the + * left-most entry in the X-Forwarded-* header. + * + * Source: https://expressjs.com/en/guide/behind-proxies.html + */ app.enable('trust proxy'); }