pub(crate) fn redact_url_credentials(url: &str) -> String
Keeps only the URL’s scheme, host, and port, or fully redacts URLs without a host.