mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 17:30:23 +08:00
fix(proxy-nodes): allow management tokens with json null allowed_ips (#317)
* fix(proxy-nodes): allow management tokens with json null allowed_ips * style(proxy-nodes): format regression test
This commit is contained in:
@@ -120,6 +120,9 @@ fn remote_ip_allowed(allowed_ips: Option<&serde_json::Value>, remote_ip: std::ne
|
||||
let Some(allowed_ips) = allowed_ips else {
|
||||
return true;
|
||||
};
|
||||
if allowed_ips.is_null() {
|
||||
return true;
|
||||
}
|
||||
let Some(items) = allowed_ips.as_array() else {
|
||||
return false;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user