diff --git a/envoy/api/v2/core/base.proto b/envoy/api/v2/core/base.proto index 14c9a89a..55c8e1b0 100644 --- a/envoy/api/v2/core/base.proto +++ b/envoy/api/v2/core/base.proto @@ -136,14 +136,14 @@ enum RequestMethod { // Header name/value pair. message HeaderValue { // Header name. - string key = 1 [(validate.rules).string.min_bytes = 1]; + string key = 1 [(validate.rules).string = {min_bytes: 1, max_bytes: 16384}]; // Header value. // // The same :ref:`format specifier ` as used for // :ref:`HTTP access logging ` applies here, however // unknown header values are replaced with the empty string instead of `-`. - string value = 2; + string value = 2 [(validate.rules).string.max_bytes = 16384]; } // Header name/value pair plus option to control append behavior. diff --git a/envoy/api/v2/core/health_check.proto b/envoy/api/v2/core/health_check.proto index 6eddc939..17400bab 100644 --- a/envoy/api/v2/core/health_check.proto +++ b/envoy/api/v2/core/health_check.proto @@ -105,7 +105,8 @@ message HealthCheck { // health checked cluster. For more information, including details on header value syntax, see // the documentation on :ref:`custom request headers // `. - repeated core.HeaderValueOption request_headers_to_add = 6; + repeated core.HeaderValueOption request_headers_to_add = 6 + [(validate.rules).repeated .max_items = 1000]; // Specifies a list of HTTP headers that should be removed from each request that is sent to the // health checked cluster. diff --git a/envoy/api/v2/rds.proto b/envoy/api/v2/rds.proto index f02735e2..4927f8dc 100644 --- a/envoy/api/v2/rds.proto +++ b/envoy/api/v2/rds.proto @@ -11,6 +11,7 @@ import "envoy/api/v2/route/route.proto"; import "google/api/annotations.proto"; import "google/protobuf/wrappers.proto"; +import "validate/validate.proto"; import "gogoproto/gogo.proto"; option (gogoproto.equal_all) = true; @@ -63,7 +64,8 @@ message RouteConfiguration { // :ref:`envoy_api_msg_route.RouteAction`. For more information, including details on // header value syntax, see the documentation on :ref:`custom request headers // `. - repeated core.HeaderValueOption response_headers_to_add = 4; + repeated core.HeaderValueOption response_headers_to_add = 4 + [(validate.rules).repeated .max_items = 1000]; // Specifies a list of HTTP headers that should be removed from each response // that the connection manager encodes. @@ -75,7 +77,8 @@ message RouteConfiguration { // :ref:`envoy_api_msg_route.RouteAction`. For more information, including details on // header value syntax, see the documentation on :ref:`custom request headers // `. - repeated core.HeaderValueOption request_headers_to_add = 6; + repeated core.HeaderValueOption request_headers_to_add = 6 + [(validate.rules).repeated .max_items = 1000]; // Specifies a list of HTTP headers that should be removed from each request // routed by the HTTP connection manager. diff --git a/envoy/api/v2/route/route.proto b/envoy/api/v2/route/route.proto index 5127bc37..24c5f1f6 100644 --- a/envoy/api/v2/route/route.proto +++ b/envoy/api/v2/route/route.proto @@ -80,7 +80,8 @@ message VirtualHost { // enclosing :ref:`envoy_api_msg_RouteConfiguration`. For more information, including // details on header value syntax, see the documentation on :ref:`custom request headers // `. - repeated core.HeaderValueOption request_headers_to_add = 7; + repeated core.HeaderValueOption request_headers_to_add = 7 + [(validate.rules).repeated .max_items = 1000]; // Specifies a list of HTTP headers that should be removed from each request // handled by this virtual host. @@ -92,7 +93,8 @@ message VirtualHost { // enclosing :ref:`envoy_api_msg_RouteConfiguration`. For more information, including // details on header value syntax, see the documentation on :ref:`custom request headers // `. - repeated core.HeaderValueOption response_headers_to_add = 10; + repeated core.HeaderValueOption response_headers_to_add = 10 + [(validate.rules).repeated .max_items = 1000]; // Specifies a list of HTTP headers that should be removed from each response // handled by this virtual host. @@ -171,7 +173,8 @@ message Route { // :ref:`envoy_api_msg_RouteConfiguration`. For more information, including details on // header value syntax, see the documentation on :ref:`custom request headers // `. - repeated core.HeaderValueOption request_headers_to_add = 9; + repeated core.HeaderValueOption request_headers_to_add = 9 + [(validate.rules).repeated .max_items = 1000]; // Specifies a list of HTTP headers that should be removed from each request // matching this route. @@ -183,7 +186,8 @@ message Route { // :ref:`envoy_api_msg_RouteConfiguration`. For more information, including // details on header value syntax, see the documentation on // :ref:`custom request headers `. - repeated core.HeaderValueOption response_headers_to_add = 10; + repeated core.HeaderValueOption response_headers_to_add = 10 + [(validate.rules).repeated .max_items = 1000]; // Specifies a list of HTTP headers that should be removed from each response // to requests matching this route. @@ -223,7 +227,8 @@ message WeightedCluster { // :ref:`envoy_api_msg_RouteConfiguration`. For more information, including details on // header value syntax, see the documentation on :ref:`custom request headers // `. - repeated core.HeaderValueOption request_headers_to_add = 4; + repeated core.HeaderValueOption request_headers_to_add = 4 + [(validate.rules).repeated .max_items = 1000]; // Specifies a list of HTTP headers that should be removed from each request when // this cluster is selected through the enclosing :ref:`envoy_api_msg_route.RouteAction`. @@ -236,7 +241,8 @@ message WeightedCluster { // :ref:`envoy_api_msg_RouteConfiguration`. For more information, including details on // header value syntax, see the documentation on :ref:`custom request headers // `. - repeated core.HeaderValueOption response_headers_to_add = 5; + repeated core.HeaderValueOption response_headers_to_add = 5 + [(validate.rules).repeated .max_items = 1000]; // Specifies a list of headers to be removed from responses when this cluster is selected // through the enclosing :ref:`envoy_api_msg_route.RouteAction`.