inspect_body

Function inspect_body 

Source
pub async fn inspect_body<B>(
    body: B,
    gen: &WafGeneration,
) -> BodyInspectionResult
where B: Body<Data = Bytes> + Send + 'static, B::Error: Into<Box<dyn Error + Send + Sync>>,
Expand description

Inspect the request body for WAF signatures. Buffers up to max_body_inspect_bytes from the body, runs the pattern match on the buffered slice, and returns the reconstructed body for forwarding. When the body exceeds the cap, only the prefix is inspected (a malicious payload beyond the cap is not caught — the trade-off for a bounded inspection cost).