From 4c28ee4c8a60b28ad777d6300856399749ab4680 Mon Sep 17 00:00:00 2001 From: Narasimha1997 Date: Sun, 29 Aug 2021 19:46:27 +0530 Subject: [PATCH] Fix: Invalid HTTP/2 origin set when servername is empty #39919 --- lib/internal/http2/core.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/http2/core.js b/lib/internal/http2/core.js index 473c1244f75da7..c6d0b9a420f4d6 100644 --- a/lib/internal/http2/core.js +++ b/lib/internal/http2/core.js @@ -3098,7 +3098,7 @@ function initializeTLSOptions(options, servername) { options.ALPNProtocols = ['h2']; if (options.allowHTTP1 === true) ArrayPrototypePush(options.ALPNProtocols, 'http/1.1'); - if (servername !== undefined && options.servername === undefined) + if (servername !== undefined && !options.servername) options.servername = servername; return options; }