mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
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>
This commit is contained in:
parent
1ac082d075
commit
2cfb0192a5
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user