Skip to main content

url_origin

Function url_origin 

Source
pub fn url_origin(value: &str) -> String
Expand description

Returns the scheme, host, and non-default port of an HTTP or WebSocket URL for logging.

Omits user information, paths, queries, and fragments, which can contain credentials. Returns [REDACTED] for invalid URLs and other schemes. Hosts use their ASCII serialization.