compression: add generic decompressor filter (#11172)

Commit Message: add generic decompressor filter
Risk Level: low - low as it is an extension, med - for users as this is a brand new filter.
Testing: unit tests, integration tests
Docs Changes: added docs
Release Notes: added release notes

Signed-off-by: Jose Nino <jnino@lyft.com>

Mirrored from https://github.com/envoyproxy/envoy @ 48a5b21d9483e7eddac79aeff7daac178d7b7462
master-ci-test
data-plane-api(CircleCI) 5 years ago
parent 6acb3d85ab
commit baebf960e7
  1. 1
      BUILD
  2. 2
      envoy/extensions/filters/http/compressor/v3/compressor.proto
  3. 12
      envoy/extensions/filters/http/decompressor/v3/BUILD
  4. 57
      envoy/extensions/filters/http/decompressor/v3/decompressor.proto
  5. 1
      versioning/BUILD

@ -172,6 +172,7 @@ proto_library(
"//envoy/extensions/filters/http/compressor/v3:pkg",
"//envoy/extensions/filters/http/cors/v3:pkg",
"//envoy/extensions/filters/http/csrf/v3:pkg",
"//envoy/extensions/filters/http/decompressor/v3:pkg",
"//envoy/extensions/filters/http/dynamic_forward_proxy/v3:pkg",
"//envoy/extensions/filters/http/dynamo/v3:pkg",
"//envoy/extensions/filters/http/ext_authz/v3:pkg",

@ -53,7 +53,7 @@ message Compressor {
config.core.v3.RuntimeFeatureFlag runtime_enabled = 5;
// A compressor library to use for compression. Currently only
// :ref:`envoy.filters.http.compressor.gzip<envoy_api_msg_extensions.compression.gzip.compressor.v3.Gzip>`
// :ref:`envoy.compression.gzip.compressor<envoy_api_msg_extensions.compression.gzip.compressor.v3.Gzip>`
// is included in Envoy.
// This field is ignored if used in the context of the gzip http-filter, but is mandatory otherwise.
config.core.v3.TypedExtensionConfig compressor_library = 6;

@ -0,0 +1,12 @@
# DO NOT EDIT. This file is generated by tools/proto_sync.py.
load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package")
licenses(["notice"]) # Apache 2
api_proto_package(
deps = [
"//envoy/config/core/v3:pkg",
"@com_github_cncf_udpa//udpa/annotations:pkg",
],
)

@ -0,0 +1,57 @@
syntax = "proto3";
package envoy.extensions.filters.http.decompressor.v3;
import "envoy/config/core/v3/base.proto";
import "envoy/config/core/v3/extension.proto";
import "google/protobuf/any.proto";
import "google/protobuf/wrappers.proto";
import "udpa/annotations/migrate.proto";
import "udpa/annotations/status.proto";
import "udpa/annotations/versioning.proto";
import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.extensions.filters.http.decompressor.v3";
option java_outer_classname = "DecompressorProto";
option java_multiple_files = true;
option (udpa.annotations.file_status).package_version_status = ACTIVE;
// [#protodoc-title: Decompressor]
// [#extension: envoy.filters.http.decompressor]
message Decompressor {
// Common configuration for filter behavior on both the request and response direction.
message CommonDirectionConfig {
// Runtime flag that controls whether the filter is enabled for decompression or not. If set to false, the
// filter will operate as a pass-through filter. If the message is unspecified, the filter will be enabled.
config.core.v3.RuntimeFeatureFlag enabled = 1;
}
// Configuration for filter behavior on the request direction.
message RequestDirectionConfig {
CommonDirectionConfig common_config = 1;
// If set to true, and response decompression is enabled, the filter modifies the Accept-Encoding
// request header by appending the decompressor_library's encoding. Defaults to true.
google.protobuf.BoolValue advertise_accept_encoding = 2;
}
// Configuration for filter behavior on the response direction.
message ResponseDirectionConfig {
CommonDirectionConfig common_config = 1;
}
// A decompressor library to use for both request and response decompression. Currently only
// :ref:`envoy.compression.gzip.compressor<envoy_api_msg_extensions.compression.gzip.decompressor.v3.Gzip>`
// is included in Envoy.
config.core.v3.TypedExtensionConfig decompressor_library = 1
[(validate.rules).message = {required: true}];
// Configuration for request decompression. Decompression is enabled by default if left empty.
RequestDirectionConfig request_direction_config = 2;
// Configuration for response decompression. Decompression is enabled by default if left empty.
ResponseDirectionConfig response_direction_config = 3;
}

@ -55,6 +55,7 @@ proto_library(
"//envoy/extensions/filters/http/compressor/v3:pkg",
"//envoy/extensions/filters/http/cors/v3:pkg",
"//envoy/extensions/filters/http/csrf/v3:pkg",
"//envoy/extensions/filters/http/decompressor/v3:pkg",
"//envoy/extensions/filters/http/dynamic_forward_proxy/v3:pkg",
"//envoy/extensions/filters/http/dynamo/v3:pkg",
"//envoy/extensions/filters/http/ext_authz/v3:pkg",

Loading…
Cancel
Save