pub struct CapturedRequest {
pub request_id: String,
pub method: String,
pub path: String,
pub query: Option<String>,
pub http_version: String,
pub headers: Vec<(String, String)>,
pub cookies: Vec<(String, String)>,
pub body_b64: String,
pub body_size: usize,
pub body_truncated: bool,
pub redacted: Vec<String>,
}Expand description
A captured HTTP request — the full request the WAF denied, as forwarded to the control-plane
drill-down. Built by CapturedRequest::from_ctx with redaction + truncation already applied.
Fields§
§request_id: StringCorrelation id — the same request_id the decision-log carries, so the CP joins this
capture onto the stored DecisionEvent.
method: String§path: String§query: Option<String>§http_version: String§headers: Vec<(String, String)>Raw request headers as received (names as-sent), redacted values swapped for REDACTED.
Parsed cookies, redacted values swapped for REDACTED.
body_b64: StringBase64 of the (possibly redacted, possibly truncated) body bytes.
body_size: usizeOriginal body size in bytes, before any truncation.
body_truncated: boolTrue when the stored body was capped at max_body_bytes (the original was larger).
redacted: Vec<String>Names (headers / cookies / body fields) that were redacted node-side — drives the UI banner.
Implementations§
Source§impl CapturedRequest
impl CapturedRequest
Sourcepub fn from_ctx(
ctx: &RequestContext,
max_body_bytes: usize,
redaction: &RedactionConfig,
) -> Self
pub fn from_ctx( ctx: &RequestContext, max_body_bytes: usize, redaction: &RedactionConfig, ) -> Self
Build a capture from a live request context, applying redaction (node-side) and capping the
stored body at max_body_bytes. Reads the RAW request fields (ctx.headers/ctx.cookies/
ctx.body) — the request as received, not the normalized canonical forms.
Sourcepub fn estimated_bytes(&self) -> usize
pub fn estimated_bytes(&self) -> usize
Rough in-memory footprint, used by the ring to enforce its byte budget. Dominated by the base64 body; header/cookie/line sizes are added so a header-heavy request is accounted for.