ratelimit: Add rate limit upstream headers (#8565)

*Ability to add custom upstream headers from ratelimit service/filter.

*For LimitStatus::OK, custom upstream headers are added if RLS service sends upstream headers.

Risk Level: Low

Testing:
Unit and integration tests added.
Verified with modified github.com/lyft/ratelimit service.
Passes "bazel test //test/..." in Linux
Docs Changes: protobuf documentation updated

Release Notes: ratelimit: support for adding custom headers to upstream server
from ratelimit service

** Issues: #6141

Signed-off-by: Nandu Vinodan <nandu.vinodan@freshworks.com>

Mirrored from https://github.com/envoyproxy/envoy @ c2a396c84cc97711eef0231f04d81ce680652abb
master-ci-test
data-plane-api(CircleCI) 5 years ago
parent 9ad4478ef5
commit f687ccda3d
  1. 5
      envoy/service/ratelimit/v2/rls.proto
  2. 5
      envoy/service/ratelimit/v3alpha/rls.proto

@ -101,6 +101,9 @@ message RateLimitResponse {
// descriptors failed and/or what the currently configured limits are for all of them.
repeated DescriptorStatus statuses = 2;
// A list of headers to add to the response
// [#next-major-version: rename to response_headers_to_add]
repeated api.v2.core.HeaderValue headers = 3;
// A list of headers to add to the request when forwarded
repeated api.v2.core.HeaderValue request_headers_to_add = 4;
}

@ -101,6 +101,9 @@ message RateLimitResponse {
// descriptors failed and/or what the currently configured limits are for all of them.
repeated DescriptorStatus statuses = 2;
// A list of headers to add to the response
// [#next-major-version: rename to response_headers_to_add]
repeated api.v3alpha.core.HeaderValue headers = 3;
// A list of headers to add to the request when forwarded
repeated api.v3alpha.core.HeaderValue request_headers_to_add = 4;
}

Loading…
Cancel
Save