enonic / lib-router

Router Library for Enonic XP.
Apache License 2.0
0 stars 1 forks source link

Support array of patterns #39

Closed rymsha closed 3 years ago

rymsha commented 3 years ago

37 improved slash handling

but did not offer easy solution to have same handler for /app and /app/{path:.+}

The idea is to allow array of patterns

router.route('GET', ['/app','/app/{path:.+}'], function(req) {
   ...
  });