1
0
Fork 0
mirror of https://codeberg.org/icewind/haze.git synced 2026-06-03 09:04:12 +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"))
} else {
let requested_instance = host.split('.').next().unwrap();
instances
.get(requested_instance)
.await
.ok_or_else(|| format!("Error {} has no known ip", requested_instance))
if requested_instance == "host-push" {
Ok((IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 7867).into())
} else {
instances
.get(requested_instance)
.await
.ok_or_else(|| format!("Error {} has no known ip", requested_instance))
}
};
match ip {
Ok(ip) => Ok(ip),