From e056c6d020357560ac32fa65c3bf97c472a9bea5 Mon Sep 17 00:00:00 2001 From: Bryce Date: Wed, 1 Nov 2023 22:59:35 -0700 Subject: [PATCH] NODE_TLS_REJECT_UNAUTHORIZED bugfix --- packages/apps/proxy/package.json | 2 +- packages/apps/proxy/src/services/features/index.ts | 2 +- packages/apps/proxy/src/services/registrar/index.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/apps/proxy/package.json b/packages/apps/proxy/package.json index 9e078a4..297b793 100644 --- a/packages/apps/proxy/package.json +++ b/packages/apps/proxy/package.json @@ -4,7 +4,7 @@ "node": ">=18" }, "description": "GrowthBook proxy server for caching, realtime updates, telemetry, etc", - "version": "1.1.2", + "version": "1.1.3", "main": "dist/app.js", "license": "MIT", "repository": { diff --git a/packages/apps/proxy/src/services/features/index.ts b/packages/apps/proxy/src/services/features/index.ts index 13ae4fc..6116dfb 100644 --- a/packages/apps/proxy/src/services/features/index.ts +++ b/packages/apps/proxy/src/services/features/index.ts @@ -49,7 +49,7 @@ export async function fetchFeatures({ // eslint-disable-next-line @typescript-eslint/no-explicit-any const fetchOptions: any = { headers }; - if (process.env.NODE_TLS_REJECT_UNAUTHORIZED !== "0") { + if (process.env.NODE_TLS_REJECT_UNAUTHORIZED === "0") { fetchOptions.agent = new https.Agent({ rejectUnauthorized: false }); } promise = fetch(url, fetchOptions) diff --git a/packages/apps/proxy/src/services/registrar/index.ts b/packages/apps/proxy/src/services/registrar/index.ts index b860d30..73697ce 100644 --- a/packages/apps/proxy/src/services/registrar/index.ts +++ b/packages/apps/proxy/src/services/registrar/index.ts @@ -114,7 +114,7 @@ export class Registrar { }; // eslint-disable-next-line @typescript-eslint/no-explicit-any const fetchOptions: any = { headers }; - if (process.env.NODE_TLS_REJECT_UNAUTHORIZED !== "0") { + if (process.env.NODE_TLS_REJECT_UNAUTHORIZED === "0") { fetchOptions.agent = new https.Agent({ rejectUnauthorized: false }); }