Function warp::filters::header::exact_ignore_case

source ·
pub fn exact_ignore_case(
    name: &'static str,
    value: &'static str,
) -> impl Filter<Extract = (), Error = Rejection> + Copy
Expand description

Create a Filter that requires a header to match the value exactly.

This Filter will look for a header with supplied name and the exact value, ignoring ASCII case, otherwise rejects the request.

§Example

// Require `connection: keep-alive` header to be set.
let keep_alive = warp::header::exact_ignore_case("connection", "keep-alive");