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
Subapp overrides all paths, even the ones from original app #209
Comments
Another noticeable bug is that subapps have incorrect |
@calumk do you have any ideas how to improve subapp handling? In the old version of Polka it used in the new version... I'm not sure what happens here: |
@talentlessguy |
@talentlessguy was tinyhttp originally based on polka? |
@calumk oh no problem then tinyhttp was inspired by Polka and I took some concepts from it but it doesn't directly depend on Polka I've spent 2 hours trying to make it work similar to Polka but atm I fail at doing this... but I hope I fix it So yeah... subapps currently are broken |
@calumk could you please try to install a new version? $ npm i @tinyhttp/app@1.1.1 the tests seem to be passing |
@talentlessguy - Thats seems to fix it for me 👍 Sorry for taking so many hours of your time! |
@calumk yaaay and lol you don't have to apologize for me making bugs thanks for reporting it :D |
You can add me to the bug contributors list ;) |
@all-contributors add @calumk for bug |
I've put up a pull request to add @calumk! 🎉 |
Describe the bug
When a subapp is mounted on a path, all of the middlewares with the same path in the original app are ignored and return 404 because it's being handled by a subapp.
To Reproduce
Expected behavior
If subapp couldn't find the handler with the request path, the original middleware should handle it instead.
Versions
node
: 15.4.0@tinyhttp/app
: 1.1.0Additional context
#203
The text was updated successfully, but these errors were encountered: