Fix "Validate TLS Certificates" option for WS and GRPC (#218)

This commit is contained in:
Andy Bao
2025-05-29 10:02:27 -04:00
committed by GitHub
parent 085b640b3c
commit bd1986f31f
17 changed files with 124 additions and 66 deletions

View File

@@ -26,13 +26,13 @@ pub struct AutoReflectionClient<T = Client<HttpsConnector<HttpConnector>, BoxBod
}
impl AutoReflectionClient {
pub fn new(uri: &Uri) -> Self {
pub fn new(uri: &Uri, validate_certificates: bool) -> Self {
let client_v1 = v1::server_reflection_client::ServerReflectionClient::with_origin(
get_transport(),
get_transport(validate_certificates),
uri.clone(),
);
let client_v1alpha = v1alpha::server_reflection_client::ServerReflectionClient::with_origin(
get_transport(),
get_transport(validate_certificates),
uri.clone(),
);
AutoReflectionClient {