Skip to main content

extract_hostname

Function extract_hostname 

Source
pub fn extract_hostname(address: &str) -> &str
Expand description

Extract the hostname portion from an address string (used as SNI key).

  • "example.com:443""example.com"
  • "[::1]:443""::1"
  • "0.0.0.0:9090""0.0.0.0"