-
-
Notifications
You must be signed in to change notification settings - Fork 917
Open
Labels
Description
What version of Hono are you using?
4.11.3
What runtime/platform is your app running on? (with version if possible)
Bun
What steps can reproduce the bug?
const app = new Hono()
app.use(async (c, next) => {
console.log(`[middleware A] in`, c.req.path, routePath(c), routePath(c, -1))
await next()
console.log(`[middleware A] out`)
})
app.get('/health', (c) => {
return c.json({
status: 'ok',
})
})
// Register middleware after `/health`
app.use(async (c, next) => {
console.log(`[middleware B] in`, c.req.path, routePath(c), routePath(c, -1))
await next()
console.log(`[middleware B] out`)
})
const server = Bun.serve({
port: process.env.PORT ?? 3000,
fetch: app.fetch,
})And got /*, whether routePath(c, -1) or routePath(c)
[middleware A] in /health /* /*
[middleware A] out
What is the expected behavior?
can got /health
What do you see instead?
got /*
Additional information
No response