Skip to content

Commit

Permalink
Adding fix to ignore self-signed certificates verification
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinoth Sermakani Alagendran committed Aug 25, 2024
1 parent 7e4c8f0 commit c44f165
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/grpc-js/src/transport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit c44f165

Please # to comment.