Validate that a URL is safe to connect to. Performs static validation checks against hostnames and direct IP addresses. Does not perform DNS resolution.
URL to validate
Optional
Allow http:// scheme (default: false)
Allow private IPs (default: false)
The validated URL
Error if URL is not safe
Validate that a URL is safe to connect to. Performs static validation checks against hostnames and direct IP addresses. Does not perform DNS resolution.