pub fn Header(name: &'static str, value: &'static str) -> impl GuardExpand description
Creates a guard that matches if request contains given header name and value.
ยงExamples
The handler below will be called when the request contains an x-guarded header with value
equal to secret.
use actix_web::{guard, web, HttpResponse};
web::route()
.guard(guard::Header("x-guarded", "secret"))
.to(|| HttpResponse::Ok());