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:
parent
d53c345bed
commit
df834f4836
1 changed files with 1 additions and 1 deletions
|
@ -551,7 +551,7 @@ class ProxyStorage implements IProxy {
|
||||||
// Otherwise misconfigured proxy could return 407:
|
// Otherwise misconfigured proxy could return 407:
|
||||||
// https://github.com/rlidwka/sinopia/issues/254
|
// 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;
|
headers['X-Forwarded-For'] = (req.headers['x-forwarded-for'] ? req.headers['x-forwarded-for'] + ', ' : '') + req.connection.remoteAddress;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue