Skip to main content

is_valid_host

Function is_valid_host 

Source
pub fn is_valid_host(host: &str) -> bool
Expand description

Returns whether host is a valid domain, IP address, or host:port/ip:port pair.

This accepts a literal host string, not a wildcard pattern such as *.example.com; see HttpAclBuilder::add_allowed_host for wildcard syntax.