Closed DPain closed 3 years ago
Hi,
NODE_TLS_REJECT_UNAUTHORIZED
must work, try to add allow_ssc_validation : false
into the /config
file.
I recommend to use Total.js v4:
var opt = {};
opt.url = 'https://yourlink.com';
opt.insecure = true;
opt.callback = function(err, response) {
// response.headers {Object}
// response.body {String/Object} a response body
// response.status {Number} status code
// response.host {String} resolved host name (opt.resolve = true returns IP address)
// response.cookies {Object} response cookies (nullable)
};
REQUEST(opt);
Thanks! I'll try that out.
Yup that fixed the issue! Thank you so much :)
Hi, I'm testing total.js locally can noticed that my U.request() method has been causing self signed certificate error. I thought setting
NODE_TLS_REJECT_UNAUTHORIZED = 0
would fix the issue, but it doesn't.I've been using axios as a temporary workaround by setting httpsAgent with a
rejectUnauthorized: false
flag.Right now, I've just set the following before starting my app and it seems to work.
https.globalAgent.options.rejectUnauthorized = false;
Is there a way to set the httpAgent for individual U.request() methods?
Thanks, in advance!