From e7a35e75afb7b795762ad2ad0bceec5f1882b9d9 Mon Sep 17 00:00:00 2001 From: "data-plane-api(Azure Pipelines)" Date: Wed, 16 Dec 2020 00:52:44 +0000 Subject: [PATCH] ratelimit: support returning custom response bodies for non-OK responses from the external ratelimit service (#14189) Signed-off-by: John Esmet Mirrored from https://github.com/envoyproxy/envoy @ 6474355e7a977e255fe88e9a2b97d3d764712852 --- envoy/service/ratelimit/v3/rls.proto | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/envoy/service/ratelimit/v3/rls.proto b/envoy/service/ratelimit/v3/rls.proto index 42f24cfb..7379368f 100644 --- a/envoy/service/ratelimit/v3/rls.proto +++ b/envoy/service/ratelimit/v3/rls.proto @@ -51,6 +51,7 @@ message RateLimitRequest { } // A response from a ShouldRateLimit call. +// [#next-free-field: 6] message RateLimitResponse { option (udpa.annotations.versioning).previous_message_type = "envoy.service.ratelimit.v2.RateLimitResponse"; @@ -131,4 +132,7 @@ message RateLimitResponse { // A list of headers to add to the request when forwarded repeated config.core.v3.HeaderValue request_headers_to_add = 4; + + // A response body to send to the downstream client when the response code is not OK. + bytes raw_body = 5; }