Closed foch closed 1 year ago
I need this fix aswell
Cant you just pass in "rejectUnauthorized" using the regular options object:
httpntlm.get({
url: "https://someurl.com",
username: 'm$',
password: 'stinks',
workstation: 'choose.something',
domain: '',
rejectUnauthorized: true
}, function (err, res){
if(err) return err;
console.log(res.headers);
console.log(res.body);
});
For me setting the "rejectUnauthorized" flag to false helped:
httpntlm.get({
url: "https://someurl.com",
username: 'm$',
password: 'stinks',
workstation: 'choose.something',
domain: '',
rejectUnauthorized: false
}, function (err, res){
if(err) return err;
console.log(res.headers);
console.log(res.body);
});
Closing PR without merging passing the rejectUnauthorized
headers just works.
Purpose of this PR is to add the possibility to target in HTTPS a server with an "invalid" certificate, i.e. not recognized by a well-known authority, but for instance self-signed. This is useful in a corporate environment, where our SharePoint (using NTLM) has a certificate signed by the company root certificate.
It's the equivalent of the
--insecure
flag of curl, hence the name of the new flag, secure. Of course, I left secure as default!It will provide a solution for issue #64