Skip to content

Commit

Permalink
Specify default TLS options for http2 client connection.
Browse files Browse the repository at this point in the history
Related to nodejs#59
  • Loading branch information
jmuk committed May 2, 2017
1 parent 7e862f3 commit 272c0f0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/internal/http2/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -1235,6 +1235,11 @@ function connect(authority, options, listener) {
socket = net.connect(port, host);
break;
case 'https:':
options = util._extend({
servername: host,
ALPNProtocols: ['h2'],
NPNProtocols: ['h2']
}, options);
socket = tls.connect(port, host, options);
break;
default:
Expand Down

0 comments on commit 272c0f0

Please sign in to comment.