Expand description
Return predicate that matches if request contains specified Host name.
use actix_web::{pred, App, HttpResponse};
fn main() {
App::new().resource("/index.html", |r| {
r.route()
.filter(pred::Host("www.rust-lang.org"))
.f(|_| HttpResponse::MethodNotAllowed())
});
}