express: document the effect of settings.trustProxy

pull/3740/head
muxator 2020-04-14 01:10:19 +02:00
parent 5503ebdb94
commit cd28643604
1 changed files with 6 additions and 0 deletions

View File

@ -100,6 +100,12 @@ exports.restartServer = function () {
});
if (settings.trustProxy) {
/*
* If 'trust proxy' === true, the clients 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');
}