Provide correct zero ClientInfo with unix sockets, fixes #310
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
use std::{
|
use std::{
|
||||||
fs,
|
fs,
|
||||||
net::SocketAddr,
|
net::{IpAddr, Ipv4Addr, SocketAddr},
|
||||||
os::unix::{fs::PermissionsExt, net::UnixListener},
|
os::unix::{fs::PermissionsExt, net::UnixListener},
|
||||||
path::Path,
|
path::Path,
|
||||||
sync::Arc,
|
sync::Arc,
|
||||||
@@ -36,7 +36,7 @@ pub(super) async fn serve(
|
|||||||
|
|
||||||
let router = router
|
let router = router
|
||||||
.clone()
|
.clone()
|
||||||
.layer(Extension(ConnectInfo("0.0.0.0".parse::<SocketAddr>())))
|
.layer(Extension(ConnectInfo(SocketAddr::new(IpAddr::V4(Ipv4Addr::UNSPECIFIED), 0))))
|
||||||
.into_make_service();
|
.into_make_service();
|
||||||
let acceptor = axum_server::from_unix(unix_listener)?
|
let acceptor = axum_server::from_unix(unix_listener)?
|
||||||
.handle(handle.clone())
|
.handle(handle.clone())
|
||||||
|
|||||||
Reference in New Issue
Block a user