Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support mounting dynamic routes. FIxes #250 #288

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
dart format
  • Loading branch information
davidmartos96 committed Sep 15, 2022
commit 73f3e28ea4bd1cdabc8ff3ce0558957d05cfd360
4 changes: 2 additions & 2 deletions pkgs/shelf_router/lib/src/router.dart
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,11 @@ class Router {

// first slash is always in request.handlerPath
final path = prefix.substring(1);

// Prefix it with two underscores to avoid conflicts
// with user defined path parameters
const pathParam = '__path';

if (prefix.endsWith('/')) {
_all(
prefix + '<$pathParam|[^]*>',
Expand Down