We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c49a94 commit ef44f83Copy full SHA for ef44f83
1 file changed
src/fetch.js
@@ -1,5 +1,6 @@
1
'use strict';
2
const fetch = require('node-fetch');
3
+const {Agent} = require('https');
4
5
module.exports = function(options = {}) {
6
const baseHeaders = {
@@ -26,6 +27,12 @@ module.exports = function(options = {}) {
26
27
options.body = JSON.stringify(body);
28
}
29
30
+ const httpsAgent = new Agent({
31
+ rejectUnauthorized: false,
32
+ });
33
+
34
+ options.agent = httpsAgent;
35
36
return fetch(url, options).then(response => {
37
const res = {
38
status: response.status,
0 commit comments