Skip to content

Commit 5638efe

Browse files
committed
test https rejectUnauthorized
1 parent 0ebe5c5 commit 5638efe

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

webhooks/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,12 @@ class Webhooks {
441441
"Content-Type": "application/json"
442442
}
443443
};
444+
if (q.protocol == "https:") {
445+
const httpsAgent = new protocol.Agent({
446+
rejectUnauthorized: false // (NOTE: this will disable client verification)
447+
});
448+
options.httpsAgent = httpsAgent;
449+
}
444450
try {
445451
const req = protocol.request(options, (response) => {
446452
logger.debug("statusCode: "+ response.statusCode + " for webhook_endpoint: " + endpoint);

0 commit comments

Comments
 (0)