Query `allowed_ips` from the matched endpoint config for a given request. Returns the list of CIDR/IP strings from the endpoint's `allowed_ips` field, or an empty vec if the field is absent or the endpoint has no match. This is used by the proxy to decide between full SSRF blocking and allowlist-based IP validation.
(&self, input: &NetworkInput)
| 555 | /// match. This is used by the proxy to decide between full SSRF blocking |
| 556 | /// and allowlist-based IP validation. |
| 557 | pub fn query_allowed_ips(&self, input: &NetworkInput) -> Result<Vec<String>> { |
| 558 | Ok(self |
| 559 | .query_endpoint_config(input)? |
| 560 | .map(|val| get_str_array(&val, "allowed_ips")) |
| 561 | .unwrap_or_default()) |
| 562 | } |
| 563 | |
| 564 | /// Return true when the matched endpoint is an exact declared hostname. |
| 565 | /// |