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
12
src/proxy.rs
12
src/proxy.rs
|
|
@ -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),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue