@nuxt/docs-nightly 5.0.0-2611092254-8b7f263 → 5.0.0-2611101354-e901ff7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/4.api/5.kit/12.nitro.md +2 -0
- package/package.json +1 -1
package/4.api/5.kit/12.nitro.md
CHANGED
|
@@ -51,6 +51,8 @@ function addServerHandler (handler: ServerHandlerInput): void
|
|
|
51
51
|
|
|
52
52
|
A route ending in `/**` matches its base path too, so `route: '/_fonts/**'` serves `/_fonts` and everything below it. On a Nitro 2 host, whose router matches only the paths below the base, Nuxt registers the base path as a second route so that one registration behaves the same on both.
|
|
53
53
|
|
|
54
|
+
This does not apply to middleware. On a Nitro 2 host, a middleware `route` is a literal path prefix: `route: '/admin'` runs for `/admin` and every path that starts with it, while `route: '/admin/**'` only runs for paths that start with the characters `/admin/**`. Register middleware on its base path there.
|
|
55
|
+
|
|
54
56
|
::read-more{to="/docs/guide/modules/server-compatibility"}
|
|
55
57
|
Learn when to register one path per server API, and which key to write your handler against.
|
|
56
58
|
::
|