Skip to main content

agent

Function agent 

Source
pub fn agent() -> &'static Agent
Expand description

Shared ureq Agent wired to a native-tls connector so HTTPS verifies against the system CA store (not the baked-in webpki-roots).

redirects(0) is set so the SSRF guard in Fetch cannot be bypassed by a 302 Location: http://169.254.169.254/… hop — the model must re-fetch any redirect target explicitly, re-triggering validation.

Falls back to a plain ureq Agent (with TLS config) if native-tls init fails at runtime instead of panicking — addresses the S5 panic-removal pass for the first-HTTPS-call panic site.