Middleware
Edit this pageMiddlewares may be included by passing file you specify in your start config.
Inside the middleware file, you can export a createMiddleware
function.
Middleware supports 2 lifecycles: onRequest
and onBeforeResponse
. If you return a value from middleware it will respond with that, otherwise it will run the next one in the chain.