Merge pull request #5105 from hardillb/alpn-http-request

Fix the capitisation for ALPN settings in http-request
pull/4887/merge
Nick O'Leary 2025-04-25 17:31:59 +01:00 committed by GitHub
commit 4b47da2767
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 11 additions and 0 deletions

View File

@ -586,6 +586,17 @@ in your Node-RED user directory (${RED.settings.userDir}).
opts.https.certificate = opts.https.cert; opts.https.certificate = opts.https.cert;
delete 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 { } else {
if (msg.hasOwnProperty('rejectUnauthorized')) { if (msg.hasOwnProperty('rejectUnauthorized')) {
opts.https = { rejectUnauthorized: msg.rejectUnauthorized }; opts.https = { rejectUnauthorized: msg.rejectUnauthorized };