Closed mladedav closed 6 months ago
The reason is that a catch-all parameters used to include the slash. Now that they don't this seems reasonable to allow.
Hi @ibraheemdev, I got around to this but I've seen in some other issues you already have the matching reworked locally so I wonder if contributing here would not be helpful?
@mladedav I implemented this as part of 0.8. Thanks for following up.
When I try to add routes to the router, it allows paths not starting with a forward slash, except when a catch-all is used.
This seems deliberate but I don't see why that is or why other routes not starting with a slash are allowed.
I might be missing something but I'd say that there should only be a slash right before the catch-all or it should be at the start of the route. So
*all
andfoo/*all
are both ok butfoo/bar*all
is not.Here are some examples of what currently works and what doesn't.
I'd be happy to provide a PR, but I want to check first if there are some considerations I'm missing.