bind to ipv6 too

This commit is contained in:
xenofem 2022-05-23 01:00:45 -04:00
parent 331a84627a
commit 463c3d98f5

View file

@ -216,9 +216,17 @@ async fn main() -> std::io::Result<()> {
})
.bind((
if reverse_proxy {
"127.0.0.1"
std::net::Ipv4Addr::LOCALHOST
} else {
"0.0.0.0"
std::net::Ipv4Addr::UNSPECIFIED
},
port,
))?
.bind((
if reverse_proxy {
std::net::Ipv6Addr::LOCALHOST
} else {
std::net::Ipv6Addr::UNSPECIFIED
},
port,
))?