Skip to content
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

Support overlapping catch-all and static routes #2930

Open
ibraheemdev opened this issue Nov 6, 2021 · 1 comment · May be fixed by #3270
Open

Support overlapping catch-all and static routes #2930

ibraheemdev opened this issue Nov 6, 2021 · 1 comment · May be fixed by #3270

Comments

@ibraheemdev
Copy link
Contributor

With the backtracking logic added in #2897, I think routes like /*wild and /static can be supported with minimal effort. By simply removing the catch-all route check when inserting a route, adding a wildcard route (/*wild) and then a static route (/static) works as expected, with static routes being given higher priority because of the addChild logic. Adding a static route first and then a wildcard might take a bit more work, but I think it's worth supporting the common use-case of serving static files (ie: a react app) at the root of the app while also having some other static routes.

@artob
Copy link

artob commented Nov 23, 2021

Related issue: #2920

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants