use localhost as default hostname

This commit is contained in:
Luna Yao
2026-04-19 01:48:08 +02:00
parent 5df7913043
commit 362547eaab
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -583,7 +583,7 @@ impl ConfigLoader for TomlConfigLoader {
hostname.unwrap_or_else(|| {
sanitize(
hostname::get()
.unwrap_or_default()
.unwrap_or_else(|_| "localhost".into())
.to_string_lossy()
.as_ref(),
)
+1 -1
View File
@@ -227,7 +227,7 @@ pub async fn run_web_client(
global_ctx.set_flags(flags);
let hostname = hostname.unwrap_or_else(|| {
hostname::get()
.unwrap_or_default()
.unwrap_or_else(|_| "localhost".into())
.to_string_lossy()
.into_owned()
});