From 851552cebdb327d52415180744757e4468a65aae Mon Sep 17 00:00:00 2001 From: Matt Schile Date: Mon, 24 Oct 2022 17:01:28 -0600 Subject: [PATCH] fix: Revert "chore: set rejectUnauthorized for api calls (#24087)" (#24370) This reverts commit d9c5e576728498ccef05193599fe3cd982d59b69. --- packages/server/lib/cloud/api.ts | 1 - packages/server/test/unit/cloud/api_spec.js | 14 -------------- 2 files changed, 15 deletions(-) diff --git a/packages/server/lib/cloud/api.ts b/packages/server/lib/cloud/api.ts index 1b5ea61eead3..d7514ab3367a 100644 --- a/packages/server/lib/cloud/api.ts +++ b/packages/server/lib/cloud/api.ts @@ -58,7 +58,6 @@ const rp = request.defaults((params, callback) => { proxy: null, gzip: true, cacheable: false, - rejectUnauthorized: true, }) const headers = params.headers != null ? params.headers : (params.headers = {}) diff --git a/packages/server/test/unit/cloud/api_spec.js b/packages/server/test/unit/cloud/api_spec.js index 360432802ea4..3beec2c3c6d3 100644 --- a/packages/server/test/unit/cloud/api_spec.js +++ b/packages/server/test/unit/cloud/api_spec.js @@ -69,20 +69,6 @@ describe('lib/cloud/api', () => { }) }) - it('sets rejectUnauthorized on the request', () => { - nock.cleanAll() - - return api.ping() - .thenThrow() - .catch(() => { - expect(agent.addRequest).to.be.calledOnce - - expect(agent.addRequest).to.be.calledWithMatch(sinon.match.any, { - rejectUnauthorized: true, - }) - }) - }) - context('with a proxy defined', () => { beforeEach(function () { nock.cleanAll()