1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-30 16:40:21 +02:00

Configurable trailing slash behaviour for NormalizePath (#1639)

Co-authored-by: ljoonal <ljoona@ljoonal.xyz>
This commit is contained in:
LJ
2020-08-19 11:21:52 +00:00
committed by GitHub
parent 3892a95c11
commit 75d86a6beb
4 changed files with 73 additions and 9 deletions

View File

@@ -17,7 +17,7 @@ use futures_util::future::{ok, Either, FutureExt, LocalBoxFuture};
/// # fn main() {
/// let enable_normalize = std::env::var("NORMALIZE_PATH") == Ok("true".into());
/// let app = App::new()
/// .wrap(Condition::new(enable_normalize, NormalizePath));
/// .wrap(Condition::new(enable_normalize, NormalizePath::default()));
/// # }
/// ```
pub struct Condition<T> {