mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 23:22:02 +00:00
fix(docs): fix broken links in server section (#2504)
Co-authored-by: pooya parsa <pyapar@gmail.com>
This commit is contained in:
parent
cac70e4696
commit
79a1b31e83
@ -53,7 +53,7 @@ export default async (req: IncomingMessage, res: ServerResponse) => {
|
||||
|
||||
Nuxt will automatically read in any files in the `~/server/middleware` to create server middleware for your project.
|
||||
|
||||
These files will be run on every request, unlike [API routes](./api) that are mapped to their own routes. This is typically so you can add a common header to all responses, log responses or modify the incoming request object for later use in the request chain.
|
||||
These files will be run on every request, unlike [API routes](#api-routes) that are mapped to their own routes. This is typically so you can add a common header to all responses, log responses or modify the incoming request object for later use in the request chain.
|
||||
|
||||
Each file should export a default function that will handle a request.
|
||||
|
||||
@ -73,4 +73,4 @@ export default async (req: IncomingMessage, res: ServerResponse) => {
|
||||
}
|
||||
```
|
||||
|
||||
More information about custom middleware can be found in the documentation for [nuxt.config.js](./nuxt.config#servermiddleware)
|
||||
More information about custom middleware can be found in the documentation for [nuxt.config.js](/docs/directory-structure/nuxt.config#servermiddleware)
|
||||
|
Loading…
Reference in New Issue
Block a user