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:
parent
37849081be
commit
ca531ed477
1 changed files with 8 additions and 4 deletions
|
|
@ -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),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue