From 6810607ddb408469f662b186246cbf8efd9bfd7d Mon Sep 17 00:00:00 2001 From: "data-plane-api(Azure Pipelines)" Date: Wed, 14 Oct 2020 15:41:59 +0000 Subject: [PATCH] ratelimit: be able to disable x-envoy-ratelimited response header sent (#13270) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: András Czigány Mirrored from https://github.com/envoyproxy/envoy @ dc3460c247538b8f81d49bd7984f46d142f20ba9 --- .../extensions/filters/http/ratelimit/v3/rate_limit.proto | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/envoy/extensions/filters/http/ratelimit/v3/rate_limit.proto b/envoy/extensions/filters/http/ratelimit/v3/rate_limit.proto index 326a30ef..bc58e7f9 100644 --- a/envoy/extensions/filters/http/ratelimit/v3/rate_limit.proto +++ b/envoy/extensions/filters/http/ratelimit/v3/rate_limit.proto @@ -19,7 +19,7 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE; // Rate limit :ref:`configuration overview `. // [#extension: envoy.filters.http.ratelimit] -// [#next-free-field: 9] +// [#next-free-field: 10] message RateLimit { option (udpa.annotations.versioning).previous_message_type = "envoy.config.filter.http.rate_limit.v2.RateLimit"; @@ -60,7 +60,6 @@ message RateLimit { // The filter's behaviour in case the rate limiting service does // not respond back. When it is set to true, Envoy will not allow traffic in case of // communication failure between rate limiting service and the proxy. - // Defaults to false. bool failure_mode_deny = 5; // Specifies whether a `RESOURCE_EXHAUSTED` gRPC code must be returned instead @@ -99,6 +98,11 @@ message RateLimit { // Disabled by default. XRateLimitHeadersRFCVersion enable_x_ratelimit_headers = 8 [(validate.rules).enum = {defined_only: true}]; + + // Disables emitting the :ref:`x-envoy-ratelimited` header + // in case of rate limiting (i.e. 429 responses). + // Having this header not present potentially makes the request retriable. + bool disable_x_envoy_ratelimited_header = 9; } message RateLimitPerRoute {