Skip to main content

scrub_urls

Function scrub_urls 

Source
fn scrub_urls(text: &str) -> String
Expand description

Replaces everything after the host of every URL in text with ***.

Assumes the text was rendered from a parsed Url, which percent-encodes the boundary characters above. Credential-bearing URLs satisfy this by entering as clap-parsed Urls, so a malformed one is rejected at startup rather than reaching a log line.