diff --git a/packages/grpc-js/src/transport.ts b/packages/grpc-js/src/transport.ts index 1acbab40e..703547f61 100644 --- a/packages/grpc-js/src/transport.ts +++ b/packages/grpc-js/src/transport.ts @@ -743,6 +743,7 @@ export class Http2SubchannelConnector implements SubchannelConnector { ...connectionOptions, ...address, enableTrace: options['grpc-node.tls_enable_trace'] === 1, + rejectUnauthorized: options['grpc-node.tls_reject_unauthorized'] ?? true, }; /* http2.connect uses the options here: @@ -837,6 +838,9 @@ export class Http2SubchannelConnector implements SubchannelConnector { if (options['grpc-node.tls_enable_trace']) { connectionOptions.enableTrace = true; } + if (options['grpc-node.tls_reject_unauthorized']) { + connectionOptions.rejectUnauthorized = options['grpc-node.tls_reject_unauthorized']; + } } return getProxiedConnection(address, options, connectionOptions).then(