Skip to main content

validate_endpoint

Function validate_endpoint 

Source
pub fn validate_endpoint(raw: &str) -> Result<String, EndpointError>
Expand description

Validate a configured endpoint.

https:// is required. Plaintext is permitted only for loopback hosts, where a batch never reaches a wire — that is the staging and dogfood case.

There is deliberately no environment variable that overrides this. CODEWHALE_ALLOW_INSECURE_HTTP is not consulted: it authorizes an insecure provider base URL, for harnesses that legitimately intercept model traffic, and reusing it would let that interception decision also authorize plaintext telemetry POSTs to an arbitrary host. Two unrelated trust decisions must not share one switch, least of all in the subsystem whose whole promise is that the user knows what leaves the machine.