1
0
Fork 0
mirror of https://codeberg.org/icewind/haze.git synced 2026-06-03 17:14:08 +02:00

add host-push proxy host to aid with local push development

This commit is contained in:
Robin Appelman 2025-04-07 21:48:56 +02:00
commit ca531ed477

View file

@ -181,10 +181,14 @@ async fn get_remote(
.ok_or_else(|| String::from("No running instance known")) .ok_or_else(|| String::from("No running instance known"))
} else { } else {
let requested_instance = host.split('.').next().unwrap(); let requested_instance = host.split('.').next().unwrap();
if requested_instance == "host-push" {
Ok((IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 7867).into())
} else {
instances instances
.get(requested_instance) .get(requested_instance)
.await .await
.ok_or_else(|| format!("Error {} has no known ip", requested_instance)) .ok_or_else(|| format!("Error {} has no known ip", requested_instance))
}
}; };
match ip { match ip {
Ok(ip) => Ok(ip), Ok(ip) => Ok(ip),