diff --git a/packages/server/package.json b/packages/server/package.json index b5528e47d6ee..1dc951803c82 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -72,7 +72,7 @@ "express-session": "1.16.1", "express-useragent": "1.0.12", "http-mitm-proxy": "0.7.0", - "https-proxy-agent": "1.0.0", + "https-proxy-agent": "2.2.0", "inquirer": "3.3.0", "istanbul": "0.4.5", "mocked-env": "1.2.4", diff --git a/packages/server/test/integration/websockets_spec.coffee b/packages/server/test/integration/websockets_spec.coffee index a818f5983001..aceac43d7a84 100644 --- a/packages/server/test/integration/websockets_spec.coffee +++ b/packages/server/test/integration/websockets_spec.coffee @@ -115,7 +115,11 @@ describe "Web Sockets", -> it "proxies https messages through http", (done) -> ## force node into legit proxy mode like a browser - agent = new httpsAgent("http://localhost:#{cyPort}") + agent = new httpsAgent({ + host: "localhost" + port: cyPort + rejectUnauthorized: false + }) @server._onDomainSet("https://localhost:#{wssPort}") @@ -145,7 +149,11 @@ describe "Web Sockets", -> evilDns.add("ws.foobar.com", "127.0.0.1") ## force node into legit proxy mode like a browser - agent = new httpsAgent("http://localhost:#{cyPort}") + agent = new httpsAgent({ + host: "localhost" + port: cyPort + rejectUnauthorized: false + }) @server._onDomainSet("https://foobar.com:#{wssPort}")