Skip to main content

host_without_port

Function host_without_port 

Source
pub(crate) fn host_without_port(host: &str) -> &str
Expand description

Strips a port from a Host header value.

A development zone is served on an explicit port, so Host arrives as agent.agents.localhost:3000 while the DID is registered under the bare hostname. IPv6 literals arrive bracketed, and the brackets are dropped with the port.