Migrate to actix-web #8
|
@ -60,6 +60,10 @@ async fn main() -> std::io::Result<()> {
|
|||
HttpServer::new(move || {
|
||||
App::new()
|
||||
.wrap(middleware::NormalizePath::trim())
|
||||
// TODO(tlater): When actix-web 4.3 releases, this can be improved a
|
||||
// lot because of this PR:
|
||||
//
|
||||
// https://github.com/actix/actix-web/pull/2784
|
||||
.wrap(
|
||||
ErrorHandlers::new()
|
||||
.handler(StatusCode::NOT_FOUND, generic_error)
|
||||
|
|
Loading…
Reference in a new issue