execute method
Implementation
Future<MiddlewareContext> execute(Object? request, String path) async {
// Execute global middleware
final context = await _globalChain.execute(request);
if (!context.shouldContinue) return context;
// Execute route-specific middleware
for (final route in _routeMiddleware) {
if (route.matches(path)) {
for (final middleware in route.middleware) {
if (!context.shouldContinue) break;
await middleware(request, context);
}
}
}
return context;
}