Skip to main content

validate_bind_address

Function validate_bind_address 

Source
pub fn validate_bind_address(addr_str: &str) -> Result<SocketAddr, ServiceError>
Expand description

Validate that a bind address string represents a localhost-only address.

Accepts:

  • 127.0.0.1
  • localhost

Rejects:

  • 0.0.0.0
  • ::
  • Any non-loopback address