-
Notifications
You must be signed in to change notification settings - Fork 321
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
Index of a nested router not found #492
Comments
This somewhat caught me out as well. I ended up working around it by dropping the leading let mut router = tide::new();
router.at("/api").nest(|router| {
router.at("").get(async move |_| "api-root");
router.at("resource").get(async move |_| "resource");
}); That definitely doesn't 'feel' very nice to me, though, and your example as written would be more natural. |
@connec exactly, I work around the bug like this as well until/if my PR gets merged. |
As mentioned in the PR, one of the recent 52 commits has fixed this one, I only left a test though. |
When a nested router has an index, the path is ignored, leeding to a 404.
Just adapt the nested example to review.
So, if you package a component together in a nested router, you cannot mount its root path.
PR with fix and tests is on the way though :)
The text was updated successfully, but these errors were encountered: