Skip to main content

check_base_url

Function check_base_url 

Source
pub fn check_base_url(base_url: Option<&str>) -> Result<(), EgressDenial>
Expand description

Refuse a base URL that would send inference off this machine.

A no-op when enabled is false. An empty or absent base URL is allowed through: it means “the driver’s own default”, which is decided elsewhere and is not something this function can classify — treating it as a denial would break local drivers that legitimately carry no explicit URL.

§Errors

Returns EgressDenial when the mode is on and the URL is not loopback.