From b822e3a94c71436ee7d94e33c5be126c5d69a811 Mon Sep 17 00:00:00 2001 From: strawberry Date: Sun, 26 May 2024 14:46:35 -0400 Subject: [PATCH] listen on IPv6 localhost by default this is dual-stack by default on linux, resolves issues with nginx using `localhost` and randomly choosing between 127.0.0.1 and [::1], causing intermittent upstream issues Signed-off-by: strawberry --- src/core/config/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/config/mod.rs b/src/core/config/mod.rs index 4a58f7d7..b4e2886a 100644 --- a/src/core/config/mod.rs +++ b/src/core/config/mod.rs @@ -1,7 +1,7 @@ use std::{ collections::BTreeMap, fmt::{self, Write as _}, - net::{IpAddr, Ipv4Addr, SocketAddr}, + net::{IpAddr, Ipv6Addr, SocketAddr}, path::PathBuf, }; @@ -875,7 +875,7 @@ impl fmt::Display for Config { fn true_fn() -> bool { true } -fn default_address() -> IpAddr { Ipv4Addr::LOCALHOST.into() } +fn default_address() -> IpAddr { Ipv6Addr::LOCALHOST.into() } fn default_port() -> ListeningPort { ListeningPort {