aboutsummaryrefslogtreecommitdiff
path: root/src/router.rs
diff options
context:
space:
mode:
authorFuwn <[email protected]>2025-07-08 05:16:56 +0000
committerFuwn <[email protected]>2025-07-08 05:16:56 +0000
commit1381dfc93851550fe05d24d69401b1ba3af1add9 (patch)
treea8ea7ee0143adf8df771b8f49cb192f8bd808eb2 /src/router.rs
parentfeat(router): Add missing trailing slash corrector (diff)
downloadwindmark-1381dfc93851550fe05d24d69401b1ba3af1add9.tar.xz
windmark-1381dfc93851550fe05d24d69401b1ba3af1add9.zip
refactor(RouterOption): Rename trailing slash trimming option
Diffstat (limited to 'src/router.rs')
-rw-r--r--src/router.rs4
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 != "/"
{