bind to ipv6 too

main
xenofem 2022-05-23 01:00:45 -04:00
parent 331a84627a
commit 463c3d98f5
1 changed files with 10 additions and 2 deletions

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,
))?