Return 405 Method Not Allowed for unsupported method for route (#63)

Fixes https://github.com/tokio-rs/axum/issues/61
This commit is contained in:
David Pedersen
2021-07-31 21:05:53 +02:00
committed by GitHub
parent 49dd1ca49a
commit 407aa533d7
6 changed files with 151 additions and 14 deletions
+1 -1
View File
@@ -168,7 +168,7 @@ where
OnMethod {
method,
svc: handler.into_service(),
fallback: EmptyRouter::new(),
fallback: EmptyRouter::method_not_allowed(),
}
}