Skip to main content

external_host_refusal

Function external_host_refusal 

Source
pub fn external_host_refusal(url: &str) -> Option<String>
Expand description

Some(reason) when a test build must not send url: the host is not loopback, blocking is on (cfg(test) or BLOCK_EXTERNAL_ENV) and GITPOULPI_LIVE_TESTS=1 is not set. A leaked real call fails loudly instead of connecting. Production builds (neither set) never refuse.