为什么生成代码中的 `/admin/report` 没有受到该中间件保护?
TypeScript
import { Hono } from 'hono'
const app = new Hono()
app.get('/admin/report', (c) => {
return c.json({ revenue: 4200 })
})
app.use('/admin/*', async (c, next) => {
if (c.req.header('authorization') !== 'Bearer valid') {
return c.json({ error: 'Unauthorized' }, 401)
}
await next()
})