-
Notifications
You must be signed in to change notification settings - Fork 177
Closed
Description
node.js version: v14.17.6
npm/yarn and version: 1.22.11
@koa/router version: 10.1.1
koa version: 2.13.4
Code sample:
let app = new (require("koa"))()
let routerA = new (require("koa-router"))()
let routerB = new (require("koa-router"))()
routerA.get('/test/(.*?)', async (ctx,next) => {
console.log('/test/(.*?)');
await next()
})
routerB.get('/test/child', async (ctx) => {
ctx.body = '/test/child';
})
app.use(routerA.routes())
app.use(routerB.routes())
app.listen(3000, () => {
console.log('应用已经启动,http://localhost:3000');
})Expected Behavior:
GET http://localhost:3000/test/child
response.body = '/test/child'
Actual Behavior:
GET http://localhost:3000/test/child
response 404 Not Found
Additional steps, HTTP request details, or to reproduce the behavior or a test case:
Metadata
Metadata
Assignees
Labels
No labels