diff options
Diffstat (limited to 'ext/node/polyfills/_tls_wrap.ts')
-rw-r--r-- | ext/node/polyfills/_tls_wrap.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/node/polyfills/_tls_wrap.ts b/ext/node/polyfills/_tls_wrap.ts index 315cbf74a..a70dd29f1 100644 --- a/ext/node/polyfills/_tls_wrap.ts +++ b/ext/node/polyfills/_tls_wrap.ts @@ -68,7 +68,7 @@ export class TLSSocket extends net.Socket { secureConnecting: boolean; _SNICallback: any; servername: string | null; - alpnProtocol: any; + alpnProtocols: string[] | null; authorized: boolean; authorizationError: any; [kRes]: any; @@ -96,6 +96,7 @@ export class TLSSocket extends net.Socket { caCerts = [new TextDecoder().decode(caCerts)]; } tlsOptions.caCerts = caCerts; + tlsOptions.alpnProtocols = ["h2", "http/1.1"]; super({ handle: _wrapHandle(tlsOptions, socket), @@ -113,7 +114,7 @@ export class TLSSocket extends net.Socket { this.secureConnecting = true; this._SNICallback = null; this.servername = null; - this.alpnProtocol = null; + this.alpnProtocols = tlsOptions.alpnProtocols; this.authorized = false; this.authorizationError = null; this[kRes] = null; |