router: add new path-splitting prefix matcher (#20145)

The new field would allow more efficient generation of routes, replacing pairs of path+prefix routes into one path_separated_prefix route

Risk Level: Low
Testing: Unit test
Docs Changes: inline
Release Notes: Added

Fixes #18148

Signed-off-by: Toma Petkov <tpetkov@vmware.com>

Mirrored from https://github.com/envoyproxy/envoy @ 8f9e11247a07cc6df0ecd62689fe290f12a9013d
pull/626/head
data-plane-api(Azure Pipelines) 3 years ago
parent 9c42588c95
commit fb7176cf26
  1. 13
      envoy/config/route/v3/route_components.proto

@ -453,7 +453,7 @@ message WeightedCluster {
}
}
// [#next-free-field: 14]
// [#next-free-field: 15]
message RouteMatch {
option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.route.RouteMatch";
@ -518,6 +518,17 @@ message RouteMatch {
// Note that CONNECT support is currently considered alpha in Envoy.
// [#comment: TODO(htuch): Replace the above comment with an alpha tag.]
ConnectMatcher connect_matcher = 12;
// If specified, the route is a path-separated prefix rule meaning that the
// ``:path`` header (without the query string) must either exactly match the
// ``path_separated_prefix`` or have it as a prefix, followed by ``/``
//
// For example, ``/api/dev`` would match
// ``/api/dev``, ``/api/dev/``, ``/api/dev/v1``, and ``/api/dev?param=true``
// but would not match ``/api/developer``
//
// Expect the value to not contain ``?`` or ``#`` and not to end in ``/``
string path_separated_prefix = 14 [(validate.rules).string = {pattern: "^[^?#]+[^?#/]$"}];
}
// Indicates that prefix/path matching should be case sensitive. The default

Loading…
Cancel
Save