Skip to content

Commit

Permalink
RDS: add response_headers_to_add/remove fields in VirtualHost and Rou…
Browse files Browse the repository at this point in the history
…teAction (#229)

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

Signed-off-by: Stephan Zuercher <stephan@turbinelabs.io>
  • Loading branch information
zuercher authored and htuch committed Nov 9, 2017
1 parent e355cdb commit 9f7557b
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 7 deletions.
2 changes: 1 addition & 1 deletion api/base.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
34 changes: 28 additions & 6 deletions api/rds.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;

Expand All @@ -526,16 +547,17 @@ 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
// that the connection manager encodes.
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
Expand Down

0 comments on commit 9f7557b

Please sign in to comment.