Skip to content

Commit

Permalink
ServerState: filter out inactive proxies properly
Browse files Browse the repository at this point in the history
  • Loading branch information
picoHz committed Sep 13, 2023
1 parent ee26332 commit df773d5
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions taxy/src/server/state.rs
Expand Up @@ -224,7 +224,9 @@ impl ServerState {
let proxies = self
.proxies
.entries()
.filter(|entry: &&ProxyEntry| entry.proxy.ports.contains(&ctx.entry.id))
.filter(|entry: &&ProxyEntry| {
entry.proxy.active && entry.proxy.ports.contains(&ctx.entry.id)
})
.cloned()
.collect();
let _ = ctx.setup(&self.certs, proxies).await;
Expand All @@ -242,7 +244,9 @@ impl ServerState {
let proxies = self
.proxies
.entries()
.filter(|entry: &&ProxyEntry| entry.proxy.ports.contains(&ctx.entry.id))
.filter(|entry: &&ProxyEntry| {
entry.proxy.active && entry.proxy.ports.contains(&ctx.entry.id)
})
.cloned()
.collect();
let span = span!(Level::INFO, "port", resource_id = ctx.entry.id.to_string());
Expand Down Expand Up @@ -284,7 +288,9 @@ impl ServerState {
let proxies = self
.proxies
.entries()
.filter(|entry: &&ProxyEntry| entry.proxy.ports.contains(&ctx.entry.id))
.filter(|entry: &&ProxyEntry| {
entry.proxy.active && entry.proxy.ports.contains(&ctx.entry.id)
})
.cloned()
.collect();
let span = span!(Level::INFO, "port", resource_id = ctx.entry.id.to_string());
Expand Down

0 comments on commit df773d5

Please sign in to comment.