Endpoint Routes - add support for regular expressions, evaluation order for routes #167
Replies: 1 comment 1 reply
-
Endpoint Routes actually already behave exactly as you are desiring. When a request is processed Endpoint Routes are evaluated in the order they are defined (first to last), so you should absolutely order routes based on priority, catch-all considerations, etc. Additionally the Endpoint Routes form supports draggable inputs for reordering/sorting updates. See the demo video below for further context (thanks for the feedback here, as it highlights this drag functionality might need to be communicated more clearly within the UI). endpoint-route-rules-draggable-demo.mov
Definitely valid feedback here. We do intend to add a |
Beta Was this translation helpful? Give feedback.
-
Noop does a good job of providing redirects and routing for static rules, AKA, Endpoint Routes. There are two features that put this behind the capabilities of Nginx, Apache, CloudFront, etc. That's matching of paths via regular expressions, and specifying an order of evaluation for multiple routes.
I think the Endpoint Routes can be made sortable with drag controls and maybe arrows to shuttle routes up and down the list. This would create a priority order of evaluation, so catch-all rules can be placed at the bottom, and more specific rules at the top.
Regex support could be made available with a "regex" or "PCRE" checkbox after "All Routes" is unchecked. It would also be nice to have a checkbox for case-insensitive matching.
Alternately, regex matching via Noop YAML logic would be a way to implement this. The
glob
operator exists, but can't touch a range a problems that regular expressions can.Beta Was this translation helpful? Give feedback.
All reactions