From df834f4836dee9d45a080195e0e46f79dd735118 Mon Sep 17 00:00:00 2001 From: Daniel Ruf <827205+DanielRuf@users.noreply.github.com> Date: Tue, 4 Jun 2019 07:17:01 +0200 Subject: [PATCH] fix: correctly check if the proxy setting evaluates to false (#1336) --- src/lib/up-storage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/up-storage.js b/src/lib/up-storage.js index d568d3682..63bb7c032 100644 --- a/src/lib/up-storage.js +++ b/src/lib/up-storage.js @@ -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; } }