Skip to content

Commit efc8141

Browse files
committed
Revert "Fix invalid cert errors on 127.0.0.1"
This reverts commit 391e0d6. Need to fix the browser version first
1 parent a6ee82f commit efc8141

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

lib/dispatchRequest.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ const axiosInstance = require('./axiosInstance')
22
const UTILS = require('./utils.js')
33
const CONST = require('./const.js')
44
const ErrorMessage = require('./errorMessage')
5-
const https = require('https');
65

76
/**
87
* base 64 encodes a string using either the btoa implementation if available or the Buffer object.
@@ -26,9 +25,6 @@ function btoaImplementation(str) {
2625
* @param {String} key optional basic auth string to be passed
2726
*/
2827
function DispatchRequest(url, action, payload, local_auth, remote_auth = null) {
29-
const agent = new https.Agent({
30-
rejectUnauthorized: !url.startsWith("https://127.0.0.1")
31-
});
3228
/*
3329
*CORS is only required when trying to fetch data from a browser,
3430
*as browsers by default will block requests to different origins
@@ -37,7 +33,6 @@ function DispatchRequest(url, action, payload, local_auth, remote_auth = null) {
3733
mode: 'cors', // no-cors, cors, *same-origin
3834
redirect: 'follow', // manual, *follow, error
3935
referrer: 'client',
40-
httpsAgent: agent,
4136
// url:url,
4237
// no-referrer, *client
4338
}

0 commit comments

Comments
 (0)