//! Shared outbound HTTP client construction.
//!
//! Every inter-service client (`WitnessClient`,
//! `ControlClient`, `WebVHClient`) talks to a peer over the network, so each
//! must fail fast rather than hang a task forever on a peer that accepts the
//! connection and then never responds, and must not silently follow a 3xx to an
//! unintended host (which would also carry any bearer token along). Building
//! them all through one helper keeps that policy in a single place.
use Duration;
/// Total per-request timeout (connect + send + receive). A peer that stalls
/// past this fails the request instead of pinning the caller's task.
const REQUEST_TIMEOUT: Duration = from_secs;
/// Connect timeout — a peer that accepts a socket but never completes the
/// handshake is abandoned quickly.
const CONNECT_TIMEOUT: Duration = from_secs;
/// A `reqwest::Client` with request + connect timeouts and redirects refused.
///
/// Redirects are refused (`Policy::none()`) so a compromised or misconfigured
/// endpoint cannot 3xx-bounce the request — and any `Authorization` header on
/// it — to a host the caller did not choose. The runtime server/control clients
/// already build this way; the shared clients now match.
pub