diff options
| author | Fuwn <[email protected]> | 2025-07-08 05:16:56 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-07-08 05:16:56 +0000 |
| commit | 1381dfc93851550fe05d24d69401b1ba3af1add9 (patch) | |
| tree | a8ea7ee0143adf8df771b8f49cb192f8bd808eb2 /src/router.rs | |
| parent | feat(router): Add missing trailing slash corrector (diff) | |
| download | windmark-1381dfc93851550fe05d24d69401b1ba3af1add9.tar.xz windmark-1381dfc93851550fe05d24d69401b1ba3af1add9.zip | |
refactor(RouterOption): Rename trailing slash trimming option
Diffstat (limited to 'src/router.rs')
| -rw-r--r-- | src/router.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/router.rs b/src/router.rs index 461d698..6ae33b0 100644 --- a/src/router.rs +++ b/src/router.rs @@ -424,7 +424,9 @@ impl Router { let mut route = self.routes.at(&path); if route.is_err() { - if self.options.contains(&RouterOption::TrimTrailingSlashes) + if self + .options + .contains(&RouterOption::RemoveExtraTrailingSlash) && path.ends_with('/') && path != "/" { |