Skip to content

Commit 2fcf1ef

Browse files
committed
docs: clarify route middleware scope
1 parent 89f59b7 commit 2fcf1ef

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/1.getting-started/07.routing.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@ Nuxt provides a customizable route middleware framework you can use throughout y
9090
Route middleware runs within the Vue part of your Nuxt app. Despite the similar name, they are completely different from server middleware, which are run in the Nitro server part of your app.
9191
::
9292

93+
::important
94+
Route middleware does **not** run for API routes (`/api/*`) or other server requests. To handle server requests, use [server middleware](/docs/4.x/guide/directory-structure/server#server-middleware) instead.
95+
::
96+
9397
There are three kinds of route middleware:
9498

9599
1. Anonymous (or inline) route middleware, which are defined directly in the pages where they are used.

0 commit comments

Comments
 (0)