From c6c713faebc7072b72af1c6be497e6842f76ed98 Mon Sep 17 00:00:00 2001 From: tottoto Date: Thu, 17 Aug 2023 21:23:52 +0900 Subject: [PATCH] fix(examples): Use https scheme when using tls --- examples/src/tls/client.rs | 2 +- examples/src/tls_client_auth/client.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/src/tls/client.rs b/examples/src/tls/client.rs index dec330f47..8c98547f2 100644 --- a/examples/src/tls/client.rs +++ b/examples/src/tls/client.rs @@ -15,7 +15,7 @@ async fn main() -> Result<(), Box> { .ca_certificate(ca) .domain_name("example.com"); - let channel = Channel::from_static("http://[::1]:50051") + let channel = Channel::from_static("https://[::1]:50051") .tls_config(tls)? .connect() .await?; diff --git a/examples/src/tls_client_auth/client.rs b/examples/src/tls_client_auth/client.rs index 79751cf1c..6670c67f5 100644 --- a/examples/src/tls_client_auth/client.rs +++ b/examples/src/tls_client_auth/client.rs @@ -19,7 +19,7 @@ async fn main() -> Result<(), Box> { .ca_certificate(server_root_ca_cert) .identity(client_identity); - let channel = Channel::from_static("http://[::1]:50051") + let channel = Channel::from_static("https://[::1]:50051") .tls_config(tls)? .connect() .await?;