Grpc: Use tls config if uri starts with https
Even if no explicit TlsConfig is set.
This commit is contained in:
parent
d3fec673cf
commit
19ccf2ff19
|
@ -403,7 +403,13 @@ pub async fn process_events(
|
|||
let f = filter_config.clone();
|
||||
|
||||
// Make TLS config if configured
|
||||
let tls_config = grpc_source.tls.as_ref().map(make_tls_config);
|
||||
let tls_config = grpc_source.tls.as_ref().map(make_tls_config).or_else(|| {
|
||||
if grpc_source.connection_string.starts_with(&"https") {
|
||||
Some(ClientTlsConfig::new())
|
||||
} else {
|
||||
None
|
||||
}
|
||||
});
|
||||
|
||||
tokio::spawn(async move {
|
||||
let mut metric_retries = metrics_sender.register_u64(
|
||||
|
|
Loading…
Reference in New Issue