Skip to content

proxy

Functions


Function

Forwards HTTP/1 requests while replacing caller-supplied attribution headers.

on_request receives the parsed method and request target before each request is forwarded. The target may contain sensitive query or fragment data; callers are responsible for sanitizing it before logging.

Returns an I/O error when reading or writing fails, or [io::ErrorKind::InvalidData] when a header block is not UTF-8, exceeds the size limit, or has invalid chunk framing.

fn forward_http1_requests<R, W, F>(client: & mut R, upstream: & mut W, attribution_headers: &std::collections::BTreeMap<String, String>, on_request: F) -> io::Result<()>