From 272c0f01fd24e616a90a002aa952ad8cb523d627 Mon Sep 17 00:00:00 2001 From: Jun Mukai Date: Tue, 2 May 2017 11:31:03 -0700 Subject: [PATCH] Specify default TLS options for http2 client connection. Related to #59 --- lib/internal/http2/core.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/internal/http2/core.js b/lib/internal/http2/core.js index 6afc87e6f7..89f3dfe3d2 100755 --- a/lib/internal/http2/core.js +++ b/lib/internal/http2/core.js @@ -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: