From 1a61b867db2d3d8749e7fc8fe9fbe1c859ae99ca Mon Sep 17 00:00:00 2001 From: Valerian Saliou Date: Fri, 11 Aug 2023 17:27:16 +0200 Subject: [PATCH] Fix deprecation notice --- src/responder/manager.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/responder/manager.rs b/src/responder/manager.rs index b97772a..095013c 100644 --- a/src/responder/manager.rs +++ b/src/responder/manager.rs @@ -5,7 +5,10 @@ // License: Mozilla Public License v2.0 (MPL v2.0) use actix_web::{ - dev::ServiceRequest, guard, middleware, rt, web, App, Error as ActixError, HttpServer, + dev::ServiceRequest, + guard, + middleware::{self, TrailingSlash}, + rt, web, App, Error as ActixError, HttpServer, }; use actix_web_httpauth::{ extractors::{ @@ -46,7 +49,7 @@ pub fn run() { let server = HttpServer::new(move || { App::new() .app_data(web::Data::new(tera.clone())) - .wrap(middleware::NormalizePath::default()) + .wrap(middleware::NormalizePath::new(TrailingSlash::Trim)) .service(routes::assets_javascripts) .service(routes::assets_stylesheets) .service(routes::assets_images)