Skip to main content

check_resolved_addresses

Function check_resolved_addresses 

Source
pub fn check_resolved_addresses(
    host: &str,
    addresses: &[IpAddr],
) -> Result<(), FetchDenial>
Expand description

Resolve a host and refuse it if ANY resolved address is blocked.

Checks every address, not just the first: a host with one public and one private A record would otherwise be reachable on a retry. This runs on the RESOLVED address rather than the hostname string, which is what defeats DNS rebinding — a name that looks public but answers with 127.0.0.1.