From 21982b8fd5826846c6b2533b7e1188646076ee04 Mon Sep 17 00:00:00 2001 From: "data-plane-api(Azure Pipelines)" Date: Thu, 16 Mar 2023 03:08:55 +0000 Subject: [PATCH] api: new field to the FilterConfig to disable a filter in specific route or vh (#25927) Risk Level: low. Testing: n/a. Signed-off-by: wbpcode Mirrored from https://github.com/envoyproxy/envoy @ 987bf5043191f3b3b71eddea4928cdccfec4331f --- envoy/config/route/v3/route_components.proto | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/envoy/config/route/v3/route_components.proto b/envoy/config/route/v3/route_components.proto index 786481cc..fdef07a2 100644 --- a/envoy/config/route/v3/route_components.proto +++ b/envoy/config/route/v3/route_components.proto @@ -2384,4 +2384,18 @@ message FilterConfig { // not support the specified filter, it may ignore the map entry rather // than rejecting the config. bool is_optional = 2; + + // If true, the filter is disabled in the route or virtual host and the ``config`` field is ignored. + // + // .. note:: + // + // This field will take effect when the request arrive and filter chain is created for the request. + // If initial route is selected for the request and a filter is disabled in the initial route, then + // the filter will not be added to the filter chain. + // And if the request is mutated later and re-match to another route, the disabled filter by the + // initial route will not be added back to the filter chain because the filter chain is already + // created and it is too late to change the chain. + // + // This field only make sense for the downstream HTTP filters for now. + bool disabled = 3; }