Skip to content

Commit ca9f8c7

Browse files
committed
Adding fix to ignore self-signed certificates verification
1 parent 7e4c8f0 commit ca9f8c7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/grpc-js/src/transport.ts

+4
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,7 @@ export class Http2SubchannelConnector implements SubchannelConnector {
743743
...connectionOptions,
744744
...address,
745745
enableTrace: options['grpc-node.tls_enable_trace'] === 1,
746+
rejectUnauthorized: options['grpc-node.tls_reject_unauthorized'] ?? true,
746747
};
747748

748749
/* http2.connect uses the options here:
@@ -837,6 +838,9 @@ export class Http2SubchannelConnector implements SubchannelConnector {
837838
if (options['grpc-node.tls_enable_trace']) {
838839
connectionOptions.enableTrace = true;
839840
}
841+
if (options['grpc-node.tls_reject_unauthorized']) {
842+
connectionOptions.rejectUnauthorized = options['grpc-node.tls_reject_unauthorized'];
843+
}
840844
}
841845

842846
return getProxiedConnection(address, options, connectionOptions).then(

0 commit comments

Comments
 (0)