Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(router) support for URIs as user-specified regexes
When a value from an API's `uris` property does not respect the reserved character set from RFC 3986, the router now assumes this value is a user-specified regex. User regexes are stored in another index than what we consider "URI prefixes" (non-regex `uris` values), because while the later needs to be evaluated based on their length, the same does not apply for the former. The order in which regexes are specified (and ultimately, APIs are registered) will be the order in which they will be evaluated. Because users might specify their own capturing groups once we support parameters extraction, the URI stripping now uses named capturing groups. This requires PCRE 7.2+. The original implementation used numbered capturing groups, but this is not aligned with our long-term goal of allowing dynamic URI rewriting as part of our Plugins API or request-transformer plugin. Breaking changes: requires PCRE 7.2+ Implements: #677 (partially)
- Loading branch information