You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A parent app that does app.use("/:path", subapp) doesn't pass req.params.path to the subapp.
To Reproduce
Code to reproduce the behavior:
import{App}from"@tinyhttp/app";constsubapp=newApp().get("/",(req,res)=>{if(req.params.test==null){res.send("req.params.test not passed");}else{res.send(`req.params.test passed: ${req.params.test}`);}});newApp().use("/:test",subapp).listen(8080,()=>console.log("listening on http://localhost:8080"));
Expected behavior
req.params.test is passed to the subapp
Versions
node: 16.3.0
@tinyhttp/app: 2.0.3
The text was updated successfully, but these errors were encountered:
Describe the bug
A parent app that does
app.use("/:path", subapp)
doesn't pass req.params.path to the subapp.To Reproduce
Code to reproduce the behavior:
Expected behavior
req.params.test
is passed to the subappVersions
node
: 16.3.0@tinyhttp/app
: 2.0.3The text was updated successfully, but these errors were encountered: