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:
RWDai
2026-04-20 21:50:48 +08:00
committed by GitHub
parent 226a6e58d5
commit cf7d129595
2 changed files with 75 additions and 0 deletions

View File

@@ -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;
};