mirror of
https://github.com/node-red/node-red.git
synced 2025-12-27 07:31:07 +01:00
Merge pull request #5105 from hardillb/alpn-http-request
Fix the capitisation for ALPN settings in http-request
This commit is contained in:
@@ -586,6 +586,17 @@ in your Node-RED user directory (${RED.settings.userDir}).
|
||||
opts.https.certificate = opts.https.cert;
|
||||
delete opts.https.cert;
|
||||
}
|
||||
// The got library uses a different case for some https properties compared to the
|
||||
// standard node tls options object.
|
||||
if (opts.https.ALPNProtocols) {
|
||||
opts.https.alpnProtocols = opts.https.ALPNProtocols
|
||||
delete opts.https.ALPNProtocols
|
||||
}
|
||||
// The got library doesn't support servername at this time
|
||||
// https://github.com/sindresorhus/got/issues/2320
|
||||
if (opts.https.servername) {
|
||||
delete opts.https.servername
|
||||
}
|
||||
} else {
|
||||
if (msg.hasOwnProperty('rejectUnauthorized')) {
|
||||
opts.https = { rejectUnauthorized: msg.rejectUnauthorized };
|
||||
|
||||
Reference in New Issue
Block a user