Skip to content

Commit

Permalink
docs(routing): add note about middleware execution order (#2282)
Browse files Browse the repository at this point in the history
  • Loading branch information
moshetanzer committed Mar 20, 2024
1 parent d2881a8 commit cb2d81d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/1.guide/2.routing.md
Expand Up @@ -200,6 +200,9 @@ middleware/
2.auth.ts <-- Second
3.... <-- Third
```
::note
Remember that file names are sorted as strings, thus for example if you have 3 files `1.filename.ts`, `2.filename.ts` and `10.filename.ts`, the `10.filename.ts` will come after the `1.filename.ts`. To avoid this, prefix `1-9` with a `0` like `01`, if you have more than 10 middleware in the same directory.
::

### Request filtering

Expand Down

0 comments on commit cb2d81d

Please sign in to comment.