Skip to content

Instantly share code, notes, and snippets.

@felangel
Last active December 16, 2022 17:44
Show Gist options
  • Save felangel/749b4d4716bd2e3e4069eba07dcbed47 to your computer and use it in GitHub Desktop.
Save felangel/749b4d4716bd2e3e4069eba07dcbed47 to your computer and use it in GitHub Desktop.
Dart Frog Catch All Middleware
import 'package:dart_frog/dart_frog.dart';
Handler middleware(Handler handler) {
return Cascade().add(handler).add(catchAll).handler;
}
Response catchAll(RequestContext context) => Response(body: 'Catch All');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment