diff --git a/src/server.rs b/src/server.rs index ab024c8c..023ed991 100644 --- a/src/server.rs +++ b/src/server.rs @@ -336,7 +336,7 @@ impl HttpServer, net::SocketAddr, H, Err(io::Error::new(io::ErrorKind::Other, "No socket addresses are bound")) } else { let addrs: Vec<(net::SocketAddr, Socket)> = self.sockets.drain().collect(); - let settings = ServerSettings::new(Some(addrs[0].0), false); + let settings = ServerSettings::new(Some(addrs[0].0), &self.host, false); let acceptor = match TlsAcceptor::builder(pkcs12) { Ok(builder) => { match builder.build() { @@ -373,7 +373,7 @@ impl HttpServer, net::SocketAddr, H, Err(io::Error::new(io::ErrorKind::Other, "No socket addresses are bound")) } else { let addrs: Vec<(net::SocketAddr, Socket)> = self.sockets.drain().collect(); - let settings = ServerSettings::new(Some(addrs[0].0), false); + let settings = ServerSettings::new(Some(addrs[0].0), &self.host, false); let acceptor = match SslAcceptorBuilder::mozilla_intermediate( SslMethod::tls(), &identity.pkey, &identity.cert, &identity.chain) {