Skip to content

Commit 08d8a1b

Browse files
committed
test rejectUnauthorized
1 parent 5638efe commit 08d8a1b

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

webhooks/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,11 +442,13 @@ class Webhooks {
442442
}
443443
};
444444
if (q.protocol == "https:") {
445+
logger.debug("Setting rejectUnauthorized: false");
445446
const httpsAgent = new protocol.Agent({
446447
rejectUnauthorized: false // (NOTE: this will disable client verification)
447448
});
448449
options.httpsAgent = httpsAgent;
449450
}
451+
logger.debug("Using request options:", options);
450452
try {
451453
const req = protocol.request(options, (response) => {
452454
logger.debug("statusCode: "+ response.statusCode + " for webhook_endpoint: " + endpoint);
@@ -473,7 +475,7 @@ class Webhooks {
473475
// logger.debug("end")
474476
}
475477
catch(err) {
476-
logger.error("an error occurred while posting this json " + JSON.stringify(json), err)
478+
logger.error("An error occurred while posting this json " + JSON.stringify(json), err)
477479
return callback(err, null)
478480
}
479481
}

0 commit comments

Comments
 (0)