Small fix for Gzip proto (#341)

Signed-off-by: Kuat Yessenov <kuat@google.com>
pull/344/head
Kuat 7 years ago committed by Matt Klein
parent 17d1abe4bf
commit cbc45f7959
  1. 5
      api/filter/http/BUILD
  2. 17
      api/filter/http/gzip.proto

@ -47,3 +47,8 @@ api_proto_library(
"//api/filter:fault",
],
)
api_proto_library(
name = "gzip",
srcs = ["gzip.proto"],
)

@ -4,6 +4,8 @@ syntax = "proto3";
package envoy.api.v2.filter.http;
import "google/protobuf/wrappers.proto";
import "validate/validate.proto";
// Gzip is an HTTP filter which enables Envoy to compress dispatched data from an upstream
@ -22,10 +24,12 @@ message Gzip {
// compression. Default value is 30.
google.protobuf.UInt32Value content_length = 2 [(validate.rules).uint32.gte = 30];
enum CompressionLevel {
DEFAULT = 0;
BEST = 1;
SPEED = 2;
message CompressionLevel {
enum Enum {
DEFAULT = 0;
BEST = 1;
SPEED = 2;
}
}
// Allows selecting Zlib's compression level. This setting will affect
@ -33,7 +37,7 @@ message Gzip {
// compression at cost of higher latency, "SPEED" provides lower compression with minimum impact
// on response time. "DEFAULT" provides an optimal result between speed and compression. This
// field will be set to "DEFAULT" if not specified.
CompressionLevel compression_level = 3 [(validate.rules).enum.defined_only = true];
CompressionLevel.Enum compression_level = 3 [(validate.rules).enum.defined_only = true];
enum CompressionStrategy {
DEFAULT = 0;
@ -61,8 +65,7 @@ message Gzip {
// Array of strings that allows specifying which mime-types yield compression; e.g.
// application/json, text/html, etc. When this field is not specified, compression will be applied
// to any "content-type".
repeated string content_type = 6
[(validate.rules).repeated = {min_items: 0, max_items: 30, unique: true}];
repeated string content_type = 6 [(validate.rules).repeated = {min_items: 0, max_items: 30}];
// Allows disabling compression if response contains "etag" (entity tag)
// header. Default is false.

Loading…
Cancel
Save