RDS: add response_headers_to_add/remove fields in VirtualHost and RouteAction (#229)

Provides API support for envoyproxy/envoy#2002 and fixes comment related to envoyproxy/envoy#2003.

Signed-off-by: Stephan Zuercher <stephan@turbinelabs.io>
pull/230/head
Stephan Zuercher 8 years ago committed by htuch
parent e355cdbe0f
commit 9f7557bc6d
  1. 2
      api/base.proto
  2. 34
      api/rds.proto

@ -116,7 +116,7 @@ message HeaderValueOption {
// of -. [V2-API-DIFF].
HeaderValue header = 1;
// Should the value be appended? If false (default), the value overrides
// Should the value be appended? If true (default), the value is appended to
// existing values [V2-API-DIFF].
google.protobuf.BoolValue append = 2;
}

@ -198,9 +198,19 @@ message RouteAction {
RoutingPriority priority = 11;
// Specifies a set of headers that will be added to requests matching this
// route.
// route. Headers specified at this level are applied before headers from the
// enclosing VirtualHost and RouteConfiguration.
repeated HeaderValueOption request_headers_to_add = 12;
// Specifies a set of headers that will be added to responses to requests
// matching this route. Headers specified at this level are applied before
// headers from the enclosing VirtualHost and RouteConfiguration.
repeated HeaderValueOption response_headers_to_add = 18;
// Specifies a list of HTTP headers that should be removed from each response
// to requests matching this route.
repeated string response_headers_to_remove = 19;
// Specifies a set of rate limit configurations that could be applied to the
// route.
repeated RateLimit rate_limits = 13;
@ -498,10 +508,21 @@ message VirtualHost {
repeated RateLimit rate_limits = 6;
// Specifies a list of HTTP headers that should be added to each request
// handled by this virtual host. In the presence of duplicate header keys,
// precedence rules apply.
// handled by this virtual host. Headers specified at this level are applied
// after headers from enclosed RouteActions and before headers from the
// enclosing RouteConfiguration.
repeated HeaderValueOption request_headers_to_add = 7;
// Specifies a list of HTTP headers that should be added to each response
// handled by this virtual host. Headers specified at this level are applied
// after headers from enclosed RouteActions and before headers from the
// enclosing RouteConfiguration.
repeated HeaderValueOption response_headers_to_add = 10;
// Specifies a list of HTTP headers that should be removed from each response
// handle by this virtual host.
repeated string response_headers_to_remove = 11;
// Indicates that the virtual host has a CORS policy.
CorsPolicy cors = 8;
@ -526,7 +547,8 @@ message RouteConfiguration {
repeated string internal_only_headers = 3;
// Specifies a list of HTTP headers that should be added to each response that
// the connection manager encodes.
// the connection manager encodes. Headers specified at this level are applied
// after headers from any enclosed VirtualHost or RouteAction.
repeated HeaderValueOption response_headers_to_add = 4;
// Specifies a list of HTTP headers that should be removed from each response
@ -534,8 +556,8 @@ message RouteConfiguration {
repeated string response_headers_to_remove = 5;
// Specifies a list of HTTP headers that should be added to each request
// routed by the HTTP connection manager. In the presence of duplicate
// header keys, precendence rules apply.
// routed by the HTTP connection manager. Headers specified at this level are
// applied after headers from any enclosed VirtualHost or RouteAction.
repeated HeaderValueOption request_headers_to_add = 6;
// An optional boolean that specifies whether the clusters that the route

Loading…
Cancel
Save