From e1ee8e46d6ad3104bb193fccf692a259e529748f Mon Sep 17 00:00:00 2001 From: Andrea Sponziello Date: Thu, 2 Dec 2021 09:11:27 +0100 Subject: [PATCH] test NODE_TLS_REJECT_UNAUTHORIZED --- webhooks/index.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/webhooks/index.js b/webhooks/index.js index ae753e7..5f428dd 100644 --- a/webhooks/index.js +++ b/webhooks/index.js @@ -442,11 +442,12 @@ class Webhooks { } }; if (q.protocol == "https:") { - logger.debug("Setting rejectUnauthorized: false"); - const httpsAgent = new protocol.Agent({ - rejectUnauthorized: false // (NOTE: this will disable client verification) - }); - options.httpsAgent = httpsAgent; + process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0" + // logger.debug("Setting rejectUnauthorized: false"); + // const httpsAgent = new protocol.Agent({ + // rejectUnauthorized: false // (NOTE: this will disable client verification) + // }); + // options.httpsAgent = httpsAgent; } logger.debug("Using request options:", options); try {