Variable: MIDDLEWARE_ABORT_ROUTE
constMIDDLEWARE_ABORT_ROUTE: uniquesymbol
Defined in: packages/core/src/router/Router.ts:42
Pass this token to the next() callback in a 3-argument middleware to
abort the entire routing pipeline — no further middlewares and no route
handler will be executed.
Only honoured in route(). Ignored in handleError() and
handleNotFound() so a misbehaving middleware cannot produce a blank page.
Example
function authMiddleware(params, locals, next) {
isAuthenticated() ? next() : next(MIDDLEWARE_ABORT_ROUTE);
}