mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-14 10:04:05 +00:00
9164179b50
Co-authored-by: Pooya Parsa <pyapar@gmail.com>
394 B
394 B
Server Middleware
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, unliked API routes that are mapped to their own routes.)
Each file should export a default function that will handle a request.
export default async (req, res) => {
req.someValue = true
}