TLS for command line client

This commit is contained in:
Alex Auvolat
2020-04-12 19:41:19 +02:00
parent c788fc9f9e
commit 9f8b3b5a18
2 changed files with 26 additions and 3 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
use std::collections::VecDeque;
use std::net::SocketAddr;
use std::net::{Ipv6Addr, SocketAddr};
use std::sync::Arc;
use futures::future::Future;
@@ -24,7 +24,7 @@ pub async fn run_api_server(
garage: Arc<Garage>,
shutdown_signal: impl Future<Output = ()>,
) -> Result<(), Error> {
let addr = ([0, 0, 0, 0, 0, 0, 0, 0], garage.system.config.api_port).into();
let addr = (Ipv6Addr::LOCALHOST, garage.system.config.api_port).into();
let service = make_service_fn(|conn: &AddrStream| {
let garage = garage.clone();