Skip to main content

retain_request_headers

Function retain_request_headers 

Source
pub fn retain_request_headers<'a>(
    headers: impl Iterator<Item = (&'a str, &'a [u8])>,
) -> Vec<(String, String)>
Expand description

Filter request headers to the recordable allowlist.

Public because the record path is not the only writer of a cassette: amberfork-replay’s loopback listener re-records the agent’s requests at the same provider boundary, and its re-executed cassette is just as shareable as a recorded one. It reuses this function so there stays exactly one allowlist — the module doc’s whole point is that a second, forked one would silently leak the next provider’s credential scheme.