- Regex source ordering
Regex source ordering
Improvement•
If multiple regexes are defined under a single source, multiple regexes can match the incoming URL. We now automatically sort the regexes list under the source based on the number of unique path segments (i.e. number of slashes in the path). We will automatically try to match the regex with the most slashes first, followed by those with fewer slashes.
This helps when defining regexes like test/(.*) and test/(.*)/(.*), where the second regex is more specific, and is commonly the one that we first want to match on.