except static method
Wraps a middleware to execute for all paths EXCEPT those starting with prefix.
Implementation
static Middleware except(String prefix, Middleware middleware) {
return (ctx, next) async {
if (ctx.request.uri.path.startsWith(prefix)) {
return await next();
}
return await middleware(ctx, next);
};
}