Skip to main content

Module validation

Module validation 

Source
Expand description

Domain validation and SSRF protection utilities

Functions§

describe_reserved_ip
Returns a human-readable reason why an IP is blocked, or None if it is safe. Intended for error messages — callers should still use is_private_or_reserved_ip for the fast boolean check.
is_private_or_reserved_ip
Checks if an IP address is in a private or reserved range.
normalize_domain
Normalizes and validates a domain name.
validate_domain_safe
Validates that a domain is safe to query (SSRF protection).