From 6e815515a7828812fca84b831c25a21e75444d1b Mon Sep 17 00:00:00 2001 From: "data-plane-api(Azure Pipelines)" Date: Thu, 27 May 2021 22:45:07 +0000 Subject: [PATCH] api: adjust the behavior of header's present_match (#16627) Currently, envoy ignores the value of present match. This commit adjust envoy's behavior. When the value is True, envoy will check the header present. When the value is False, envoy will check the header absent. Signed-off-by: He Jie Xu Mirrored from https://github.com/envoyproxy/envoy @ 9a7a7ede474780c2bd8fe59e7a93e537204cfe31 --- envoy/config/route/v3/route_components.proto | 4 ++-- envoy/config/route/v4alpha/route_components.proto | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/envoy/config/route/v3/route_components.proto b/envoy/config/route/v3/route_components.proto index 58ac31d4..ee82e8f7 100644 --- a/envoy/config/route/v3/route_components.proto +++ b/envoy/config/route/v3/route_components.proto @@ -1885,8 +1885,8 @@ message HeaderMatcher { // "-1somestring" type.v3.Int64Range range_match = 6; - // If specified, header match will be performed based on whether the header is in the - // request. + // If specified as true, header match will be performed based on whether the header is in the + // request. If specified as false, header match will be performed based on whether the header is absent. bool present_match = 7; // If specified, header match will be performed based on the prefix of the header value. diff --git a/envoy/config/route/v4alpha/route_components.proto b/envoy/config/route/v4alpha/route_components.proto index ce3b1c47..256a3c74 100644 --- a/envoy/config/route/v4alpha/route_components.proto +++ b/envoy/config/route/v4alpha/route_components.proto @@ -1837,8 +1837,8 @@ message HeaderMatcher { // "-1somestring" type.v3.Int64Range range_match = 6; - // If specified, header match will be performed based on whether the header is in the - // request. + // If specified as true, header match will be performed based on whether the header is in the + // request. If specified as false, header match will be performed based on whether the header is absent. bool present_match = 7; // If specified, header match will be performed based on the prefix of the header value.