Skip to content

Commit

Permalink
test https rejectUnauthorized
Browse files Browse the repository at this point in the history
  • Loading branch information
sponzillo committed Dec 2, 2021
1 parent 0ebe5c5 commit 5638efe
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions webhooks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5638efe

Please sign in to comment.