Commit 9e15a33
authored
docs: fix incorrect middleware execution order in Hono adapter (#42)
The Skip behavior section claimed that route-level middleware runs
before app-wide middleware. This is wrong -- Hono runs middleware in
registration order, so app.use('*', ...) always runs first.
The documented pattern (app-wide 'user' + route-level 'secret')
would not work as described: the app-wide middleware runs first,
sets the context, and the route-level middleware skips.
Replaced the section with a note about the actual execution order
and a pointer to the per-route auth pattern, which works correctly.1 parent 2fb043e commit 9e15a33
1 file changed
Lines changed: 3 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
| 86 | + | |
91 | 87 | | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
| 88 | + | |
100 | 89 | | |
101 | 90 | | |
102 | 91 | | |
| |||
0 commit comments