Skip to content

Commit

Permalink
fix: correctly check if the proxy setting evaluates to false (#1336)
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielRuf authored and juanpicado committed Jun 4, 2019
1 parent d53c345 commit df834f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/up-storage.js
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit df834f4

Please sign in to comment.