🏗️ Elegant & Highly Performant Async Gemini Server Framework for the Modern Age
async framework gemini-protocol protocol gemini rust
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

refactor(RouterOption): Rename trailing slash trimming option

Fuwn 1381dfc9 22299ccd

+5 -3
+1 -1
examples/fix_path.rs
··· 23 23 .set_private_key_file("windmark_private.pem") 24 24 .set_certificate_file("windmark_public.pem") 25 25 .add_options(&[ 26 - windmark::router_option::RouterOption::TrimTrailingSlashes, 26 + windmark::router_option::RouterOption::RemoveExtraTrailingSlash, 27 27 windmark::router_option::RouterOption::AddMissingTrailingSlash, 28 28 ]) 29 29 .mount(
+3 -1
src/router.rs
··· 424 424 let mut route = self.routes.at(&path); 425 425 426 426 if route.is_err() { 427 - if self.options.contains(&RouterOption::TrimTrailingSlashes) 427 + if self 428 + .options 429 + .contains(&RouterOption::RemoveExtraTrailingSlash) 428 430 && path.ends_with('/') 429 431 && path != "/" 430 432 {
+1 -1
src/router_option.rs
··· 3 3 pub enum RouterOption { 4 4 /// Trim trailing slashes from the URL path if it is present and a route 5 5 /// match exists 6 - TrimTrailingSlashes, 6 + RemoveExtraTrailingSlash, 7 7 /// Add a trailing slash to the URL path if it is missing and a route 8 8 /// match exists 9 9 AddMissingTrailingSlash,