http: new disable flag to disable a filter in the filter chain by default (#30141)

* http api: new disable flag to disable a filter in the filter chain by default

Signed-off-by: wbpcode <wangbaiping@corp.netease.com>

* complete development

Signed-off-by: wbpcode <wangbaiping@corp.netease.com>

* more tests to verify the new feature

Signed-off-by: wbpcode <wangbaiping@corp.netease.com>

* add release note

Signed-off-by: wbpcode <wangbaiping@corp.netease.com>

* fix link

Signed-off-by: wbpcode <wangbaiping@corp.netease.com>

* fix test

Signed-off-by: wbpcode <wangbaiping@corp.netease.com>

* Update api/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto

Co-authored-by: Matt Klein <mattklein123@gmail.com>
Signed-off-by: code <wangbaiping@corp.netease.com>

* Update changelogs/current.yaml

Co-authored-by: Matt Klein <mattklein123@gmail.com>
Signed-off-by: code <wangbaiping@corp.netease.com>

* Update source/common/http/filter_chain_helper.h

Co-authored-by: Matt Klein <mattklein123@gmail.com>
Signed-off-by: code <wangbaiping@corp.netease.com>

* fix spelling error

Signed-off-by: wbpcode <wangbaiping@corp.netease.com>

* fix ci

Signed-off-by: wbpcode <wangbaiping@corp.netease.com>

---------

Signed-off-by: wbpcode <wangbaiping@corp.netease.com>
Signed-off-by: code <wangbaiping@corp.netease.com>
Co-authored-by: Matt Klein <mattklein123@gmail.com>

Mirrored from https://github.com/envoyproxy/envoy @ 9be3183433f30e9a726add174c80fd32cf6b7202
main
update-envoy[bot] 1 year ago
parent 9e28231f8c
commit f1e01bbea4
  1. 16
      envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto

@ -1132,7 +1132,7 @@ message ScopedRds {
string srds_resources_locator = 2;
}
// [#next-free-field: 7]
// [#next-free-field: 8]
message HttpFilter {
option (udpa.annotations.versioning).previous_message_type =
"envoy.config.filter.network.http_connection_manager.v2.HttpFilter";
@ -1169,6 +1169,20 @@ message HttpFilter {
// filter but otherwise accept the config.
// Otherwise, clients that do not support this filter must reject the config.
bool is_optional = 6;
// If true, the filter is disabled by default and must be explicitly enabled by setting
// per filter configuration in the route configuration.
//
// A disabled filter will be treated as enabled in the following cases:
//
// 1. Valid per filter configuration is configured in the ``typed_per_filter_config`` of route config.
// 2. :ref:`FilterConfig <envoy_v3_api_msg_config.route.v3.FilterConfig>` is configured in the
// ``typed_per_filter_config`` of route config and the
// :ref:`disabled of FilterConfig <envoy_v3_api_field_config.route.v3.FilterConfig.disabled>`
// is set to false.
//
// Terminal filters (e.g. ``envoy.filters.http.router``) cannot be marked as disabled.
bool disabled = 7;
}
message RequestIDExtension {

Loading…
Cancel
Save