Skip to main content

duplicate_header

Function duplicate_header 

Source
pub fn duplicate_header(
    header_name: &str,
    real_value: &str,
    benign_value: &str,
) -> (String, String)
Expand description

Generate a duplicate header pair: returns (benign_line, real_line).

Some WAFs only inspect the first occurrence of a header, while many servers use the last. By placing a benign value first and the real value second, the WAF sees the benign header, the server sees the real one.