import { ... } from "@langchain/core/utils/ssrf";Check if a hostname or IP is a known cloud metadata endpoint.
Check if a hostname or IP is localhost.
Check if an IP address is private (RFC 1918, loopback, link-local, etc.)
Check if a URL is safe to connect to (non-throwing version).
Check if two URLs have the same origin (scheme, host, port). Uses semantic URL parsing to prevent SSRF bypasses via URL variations.
Validate that a URL is safe to connect to. Performs static validation checks against hostnames and direct IP addresses. Does not perform DNS resolution.