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
When trying to request a route from the second subapp mounted on the same path, it returns 404.
This happens because the first subapp responds with 404 (e.g. calls no match handler) and therefore doesn't switch to the next app, resulting in 404 even though the route is present in another app.
Code
importAppfrom'polka'constrouter=App()router.get('/upload',(req,res)=>res.end('upload'))constrouter2=App()router2.get('/product',(req,res)=>res.end('product'))constapp=App()app.use('/api/v1',router,router2)app.listen(3000,()=>console.log(`Started on :3000`))
Expected result
$ curl localhost:3000/api/v1/product
product
Same code but with Express v4 returns the expected result.
Actual result
$ curl localhost:3000/api/v1/product
Not Found
Info
polka: 1.0.0-next.11
Node.js: 15.8
uname -r: 5.10.15-1-MANJARO
The text was updated successfully, but these errors were encountered:
Description
When trying to request a route from the second subapp mounted on the same path, it returns 404.
This happens because the first subapp responds with 404 (e.g. calls no match handler) and therefore doesn't switch to the next app, resulting in 404 even though the route is present in another app.
Code
Expected result
Same code but with Express v4 returns the expected result.
Actual result
Info
1.0.0-next.11
uname -r
: 5.10.15-1-MANJAROThe text was updated successfully, but these errors were encountered: