Merge pull request #3089 from hardillb/http-req-ca-fix

Fix support for supplied CA certs
This commit is contained in:
Nick O'Leary
2021-07-26 14:20:08 +01:00
committed by GitHub
2 changed files with 31 additions and 0 deletions

View File

@@ -449,6 +449,10 @@ in your Node-RED user directory (${RED.settings.userDir}).
if (tlsNode) {
opts.https = {};
tlsNode.addTLSOptions(opts.https);
if (opts.https.ca) {
opts.https.certificateAuthority = opts.https.ca;
delete opts.https.ca;
}
} else {
if (msg.hasOwnProperty('rejectUnauthorized')) {
opts.https = { rejectUnauthorized: msg.rejectUnauthorized };