From 2a6c67ee615658057c3830807dd92dd3abbcb17b Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Wed, 1 Apr 2020 01:59:41 +0200 Subject: [PATCH] fix: disable http-proxy when extension is inactive --- add-on/src/lib/http-proxy.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/add-on/src/lib/http-proxy.js b/add-on/src/lib/http-proxy.js index 6ce25bad3..1e7c553b5 100644 --- a/add-on/src/lib/http-proxy.js +++ b/add-on/src/lib/http-proxy.js @@ -32,7 +32,8 @@ log.error = debug('ipfs-companion:http-proxy:error') // https://bugzilla.mozilla.org/show_bug.cgi?id=1220810 async function registerSubdomainProxy (getState, runtime, notify) { try { - const { useSubdomainProxy: enable, gwURLString } = getState() + const { active, useSubdomainProxy, gwURLString } = getState() + const enable = active && useSubdomainProxy // HTTP Proxy feature is exposed on the gateway port // Just ensure we use localhost IP to remove any dependency on DNS