grpc-js: setting ALPNProtocols option for tls proxy

This commit is contained in:
Tom Kirkpatrick 2020-04-19 20:00:05 +02:00
parent b9e84f499f
commit 48072d5f4f
No known key found for this signature in database
GPG Key ID: 72203A8EC5967EA8
1 changed files with 1 additions and 0 deletions

View File

@ -424,6 +424,7 @@ export class Subchannel {
this.credentials._getConnectionOptions() || {}; this.credentials._getConnectionOptions() || {};
if ('secureContext' in connectionOptions) { if ('secureContext' in connectionOptions) {
connectionOptions.ALPNProtocols = ['h2'];
// If provided, the value of grpc.ssl_target_name_override should be used // If provided, the value of grpc.ssl_target_name_override should be used
// to override the target hostname when checking server identity. // to override the target hostname when checking server identity.
// This option is used for testing only. // This option is used for testing only.