Path filtering and rate limit for kubernetes

This commit is contained in:
Ara Sadoyan
2025-10-15 13:42:05 +02:00
parent 5359c2e8e9
commit 25693a7058
4 changed files with 46 additions and 24 deletions
+3 -3
View File
@@ -86,14 +86,14 @@ async fn consul_request(url: String, whitelist: Option<Vec<ServiceMapping>>, tok
match whitelist {
Some(whitelist) => {
for k in whitelist.iter() {
let pref: String = ss.clone() + &k.real;
let pref: String = ss.clone() + &k.hostname;
let list = get_by_http(pref.clone(), token.clone()).await;
match list {
Some(list) => {
upstreams.insert(k.proxy.clone(), list);
upstreams.insert(k.upstream.clone(), list);
}
None => {
warn!("Whitelist not found for {}", k.proxy);
warn!("Whitelist not found for {}", k.upstream);
}
}
}