router: add support for prefix and suffix header matching (#3576)

Signed-off-by: Yangmin Zhu <ymzhu@google.com>

Mirrored from https://github.com/envoyproxy/envoy @ 1b4899d1ff6cdc7118f6eb2c5456a38d0c7c26df
pull/620/head
data-plane-api(CircleCI) 7 years ago
parent 11eb82729e
commit 5466f88865
  1. 16
      envoy/api/v2/route/route.proto

@ -939,6 +939,22 @@ message HeaderMatcher {
// If specified, header match will be be performed based on whether the header is in the // If specified, header match will be be performed based on whether the header is in the
// request. // request.
bool present_match = 7; bool present_match = 7;
// If specified, header match will be performed based on the prefix of the header value.
// Note: empty prefix is not allowed, please use present_match instead.
//
// Examples:
//
// * The prefix *abcd* matches the value *abcdxyz*, but not for *abcxyz*.
string prefix_match = 9 [(validate.rules).string.min_bytes = 1];
// If specified, header match will be performed based on the suffix of the header value.
// Note: empty suffix is not allowed, please use present_match instead.
//
// Examples:
//
// * The suffix *abcd* matches the value *xyzabcd*, but not for *xyzbcd*.
string suffix_match = 10 [(validate.rules).string.min_bytes = 1];
} }
// If specified, the match result will be inverted before before checking. Defaults to false. // If specified, the match result will be inverted before before checking. Defaults to false.

Loading…
Cancel
Save