From 5638efe52d12a95b329b44a3181440316b6339c8 Mon Sep 17 00:00:00 2001 From: Andrea Sponziello Date: Thu, 2 Dec 2021 08:56:24 +0100 Subject: [PATCH] test https rejectUnauthorized --- webhooks/index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/webhooks/index.js b/webhooks/index.js index 68d24a1..4d03806 100644 --- a/webhooks/index.js +++ b/webhooks/index.js @@ -441,6 +441,12 @@ class Webhooks { "Content-Type": "application/json" } }; + if (q.protocol == "https:") { + const httpsAgent = new protocol.Agent({ + rejectUnauthorized: false // (NOTE: this will disable client verification) + }); + options.httpsAgent = httpsAgent; + } try { const req = protocol.request(options, (response) => { logger.debug("statusCode: "+ response.statusCode + " for webhook_endpoint: " + endpoint);