mirror of
https://github.com/actix/actix-website
synced 2024-11-24 08:43:01 +01:00
14 lines
291 B
Rust
14 lines
291 B
Rust
|
// <pred>
|
||
|
use actix_web::{pred, App, HttpResponse};
|
||
|
|
||
|
fn main() {
|
||
|
App::new()
|
||
|
.resource("/index.html", |r| {
|
||
|
r.route()
|
||
|
.filter(pred::Not(pred::Get()))
|
||
|
.f(|req| HttpResponse::MethodNotAllowed())
|
||
|
})
|
||
|
.finish();
|
||
|
}
|
||
|
// </pred>
|