You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think had hoped that NormalizePath might let you create a route like /hello and accept either /hello or /hello/ I suppose this can also be achieved via route matching (e.g. #[get(r#"/hello{tail:/?}"#)]) (as an aside: I also wonder if users would prefer to accept both distinct routes or have one version 301 redirect to the other?).
When I tried to check v3 beta, seems like my usage of NormalizePath did not work for me? Not sure if I have something mixed up here, but wasn't able to access either /hello or /hello/.
So, middleware should take option TrailingSlash::{Always, Trim} and possibly an option to 301 redirect to the normalized path.
The text was updated successfully, but these errors were encountered:
I'd be interested to get something like this added. I made a small branch to test it on even. But I by no means thought a ton about the implementation, so it'd probably be good for someone to see if I missed something obvious 😅
excerpt from #959
So, middleware should take option
TrailingSlash::{Always, Trim}
and possibly an option to 301 redirect to the normalized path.The text was updated successfully, but these errors were encountered: