Skip to content

Commit 36ad6a2

Browse files
authored
fix firehose tls (#5923)
1 parent 5d7e4ce commit 36ad6a2

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

Cargo.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,14 @@ chrono = "0.4.38"
4747
bs58 = "0.5.1"
4848
clap = { version = "4.5.4", features = ["derive", "env"] }
4949
derivative = "2.2.0"
50-
diesel = { version = "2.2.7", features = ["postgres", "serde_json", "numeric", "r2d2", "chrono", "i-implement-a-third-party-backend-and-opt-into-breaking-changes"] }
50+
diesel = { version = "2.2.7", features = [
51+
"postgres",
52+
"serde_json",
53+
"numeric",
54+
"r2d2",
55+
"chrono",
56+
"i-implement-a-third-party-backend-and-opt-into-breaking-changes",
57+
] }
5158
diesel-derive-enum = { version = "2.1.0", features = ["postgres"] }
5259
diesel-dynamic-schema = { version = "0.2.3", features = ["postgres"] }
5360
diesel_derives = "2.2.3"

graph/src/firehose/endpoints.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,14 @@ impl FirehoseEndpoint {
194194

195195
let endpoint_builder = match uri.scheme().unwrap_or(&Scheme::HTTP).as_str() {
196196
"http" => Channel::builder(uri),
197-
"https" => Channel::builder(uri)
198-
.tls_config(ClientTlsConfig::new())
199-
.expect("TLS config on this host is invalid"),
197+
"https" => {
198+
let mut tls = ClientTlsConfig::new();
199+
tls = tls.with_native_roots();
200+
201+
Channel::builder(uri)
202+
.tls_config(tls)
203+
.expect("TLS config on this host is invalid")
204+
}
200205
_ => panic!("invalid uri scheme for firehose endpoint"),
201206
};
202207

0 commit comments

Comments
 (0)