0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-01-27 22:59:51 -05:00

fix: correctly check if the proxy setting evaluates to false (#1336)

This commit is contained in:
Daniel Ruf 2019-06-04 07:17:01 +02:00 committed by Juan Picado @jotadeveloper
parent d53c345bed
commit df834f4836

View file

@ -551,7 +551,7 @@ class ProxyStorage implements IProxy {
// Otherwise misconfigured proxy could return 407:
// https://github.com/rlidwka/sinopia/issues/254
//
if (this.proxy === false) {
if (!this.proxy) {
headers['X-Forwarded-For'] = (req.headers['x-forwarded-for'] ? req.headers['x-forwarded-for'] + ', ' : '') + req.connection.remoteAddress;
}
}