Skip to content

Commit

Permalink
NODE_TLS_REJECT_UNAUTHORIZED bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
bryce-fitzsimons committed Nov 2, 2023
1 parent c6d5fee commit e056c6d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/apps/proxy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion packages/apps/proxy/src/services/features/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion packages/apps/proxy/src/services/registrar/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
}

Expand Down

0 comments on commit e056c6d

Please sign in to comment.