I'm using Mikeal's request (https://github.com/mikeal/request) to make an https request to a server. However, I keep getting an authorization error of CERT_HAS_EXPIRED.
request({
url: 'https://www.domain.com/api/endpoint',
strictSSL: false
}, function(error, response, body) {
if(!error && response.statusCode == 200) {
res.json(JSON.parse(body));
} else {
res.json(response.statusCode, {'error': 'error'})
}
});
I've tried setting strictSSL to true and false, both output same error of CERT_HAS_EXPIRED. What is causing this issue and is there any way to fix it in nodejs?