New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
routeRules
are sensitive to trailing slashes
#2146
Comments
This comment was marked as off-topic.
This comment was marked as off-topic.
routeRules
redirection is sensitive to trailing slashrouteRules
redirection is sensitive to trailing slash and casing
This comment was marked as off-topic.
This comment was marked as off-topic.
routeRules
redirection is sensitive to trailing slash and casingrouteRules
are sensitive to trailing slashes
routeRules
are sensitive to trailing slashesrouteRules
are sensitive to trailing slashes
This comment was marked as off-topic.
This comment was marked as off-topic.
Great. Thanks! The current issue I mentioned a few minutes ago actually pertains more to the trailing slash. As a workaround, I think I could switch to using |
I have investigated it a little more. It seems a bug in upstream radix3 matcher to be solved: unjs/radix3#87
|
That is the weird thing. I have duplicated the route rules, but for some reason the one without the trailing slash works and not the one with. Check out these links: And here are the
Any idea as to why there is a discrepancy in how these are working? And if this is not the best place to troubleshoot this, please point me in the right direction. :-) |
@lwpinion can you try a local build and check if the problem isn't the platform? |
(i can confirm problem is not local) Lets track via unjs/radix3#87 |
Indeed. The problem does seem to occur locally for me as well. |
fixed with radix3 1.1.1: https://github.com/unjs/radix3/releases/tag/v1.1.1 confirmed on reproduction. |
Environment
stackblitz
Reproduction
https://stackblitz.com/edit/github-yjju3h?file=nitro.config.ts,routes/index.ts,routes/sponsors.ts
Describe the bug
when a route rule is defined with a reproduction, this does not apply if a trailing slash is appended to the request:
Requesting
/support-me
works fine but/support-me/
does not redirect.Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: