Skip to content

Commit

Permalink
Fix: Invalid HTTP/2 origin set when servername is empty #39919
Browse files Browse the repository at this point in the history
  • Loading branch information
Narasimha1997 committed Aug 29, 2021
1 parent 449147e commit 4c28ee4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/http2/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 4c28ee4

Please sign in to comment.