mirror of
https://github.com/actix/actix-website
synced 2024-11-27 18:12:57 +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>
|