From 2cfb0192a583ab4b94d3046ff4d34d5f944ca603 Mon Sep 17 00:00:00 2001 From: npub1t2tgm7d8f995uqvmnm8h88sg3wnpp9a5xysjf6dg3tjmgt3ltulqdp8ehr <5a968df9a7494b4e019b9ecf739e088ba61097b4312124e9a88ae5b42e3f5f3e@sprout-oss.stage.blox.sqprod.co> Date: Sat, 27 Jun 2026 21:54:09 -0400 Subject: [PATCH] Pin desktop localhost HTTP resolution Co-authored-by: npub1t2tgm7d8f995uqvmnm8h88sg3wnpp9a5xysjf6dg3tjmgt3ltulqdp8ehr <5a968df9a7494b4e019b9ecf739e088ba61097b4312124e9a88ae5b42e3f5f3e@sprout-oss.stage.blox.sqprod.co> Signed-off-by: npub1t2tgm7d8f995uqvmnm8h88sg3wnpp9a5xysjf6dg3tjmgt3ltulqdp8ehr <5a968df9a7494b4e019b9ecf739e088ba61097b4312124e9a88ae5b42e3f5f3e@sprout-oss.stage.blox.sqprod.co> --- desktop/src-tauri/src/app_state.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/desktop/src-tauri/src/app_state.rs b/desktop/src-tauri/src/app_state.rs index 4f595c348..d80f7c892 100644 --- a/desktop/src-tauri/src/app_state.rs +++ b/desktop/src-tauri/src/app_state.rs @@ -84,6 +84,12 @@ pub fn build_app_state() -> AppState { AppState { keys: Mutex::new(keys), http_client: reqwest::Client::builder() + // Keep URL authority/Host headers intact for relay tenant binding, + // but avoid macOS/IPv6 localhost flakiness for local dev services. + // reqwest uses the URL port over this port-0 DNS override, so + // http://localhost:3000 still sends Host: localhost:3000 while + // connecting to 127.0.0.1:3000 instead of ::1. + .resolve("localhost", std::net::SocketAddr::from(([127, 0, 0, 1], 0))) .pool_idle_timeout(std::time::Duration::from_secs(10)) .pool_max_idle_per_host(1) .build()