mirror of
https://github.com/sadoyan/aralez.git
synced 2026-10-23 06:01:35 +08:00
Path filtering and rate limit for kubernetes
This commit is contained in:
+3
-3
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user