diff --git a/docs/content/3.docs/2.directory-structure/13.server.md b/docs/content/3.docs/2.directory-structure/13.server.md index ef947ea920..3235897912 100644 --- a/docs/content/3.docs/2.directory-structure/13.server.md +++ b/docs/content/3.docs/2.directory-structure/13.server.md @@ -89,4 +89,17 @@ export default async (req: IncomingMessage, res: ServerResponse) => { } ``` +To pass the request deeper into the application, you can simply `return` inside the function: + +```js +export default async (req, res) => { + const isNotHandledByThisMiddleware = req.url.includes('/some-unhandled-url-path/') + if(isNotHandledByThisMiddleware) { + return + } + + // Actual logic here +} +``` + More information about custom middleware can be found in the documentation for [nuxt.config.js](/docs/directory-structure/nuxt.config#servermiddleware)