I have a working Envoy proxy configuration that matches two routes /name/foo/bar?mode=receive-data
and /name/receive-data
. The Envoy configuration file looks something like this:
static_resources:
...
filter_chains:
- filters:
- name: envoy.http_connection_manager
typed_config:
...
route_config:
virtual_hosts:
- ...
routes:
- match:
prefix: "/name/foo/bar?mode=receive-data"
...
- match:
prefix: "/name/receive-data"
...
I need to update the configuration from using route prefix
matching to regex
match as explained in the route.RouteMatch documentation. These two route deinitions must be converted to /:name/foo/bar?mode=receive-data
and /:name/receive-data
somehow, where :name
can be [a-z0-9]
. I've tried to write my own regex:
for this, but with no success, so I'd appreciate some help here.
To find location matching a given request, nginx first checks locations defined using the prefix strings (prefix locations).
According to documentation on 1.13.1: