Determines if two URLs belong to the same host by comparing their normalized URL objects.
Handles various input formats including URL objects, domain strings, relative paths, and full URLs.
Returns false if either URL cannot be parsed or normalized.
Returns
True if both URLs have the same host, false otherwise
Determines if two URLs belong to the same host by comparing their normalized URL objects. Handles various input formats including URL objects, domain strings, relative paths, and full URLs. Returns false if either URL cannot be parsed or normalized.
Returns
True if both URLs have the same host, false otherwise