.. _envoy_v3_api_file_envoy/extensions/filters/http/compressor/v3/compressor.proto: Compressor (proto) ================== .. _extension_envoy.filters.http.compressor: This extension has the qualified name ``envoy.filters.http.compressor`` .. note:: This extension is intended to be robust against untrusted downstream traffic. It assumes that the upstream is trusted. .. tip:: This extension extends and can be used with the following extension category: - :ref:`envoy.filters.http ` This extension must be configured with one of the following type URLs: - :ref:`type.googleapis.com/envoy.extensions.filters.http.compressor.v3.Compressor ` - :ref:`type.googleapis.com/envoy.extensions.filters.http.compressor.v3.CompressorPerRoute ` Compressor :ref:`configuration overview `. .. _envoy_v3_api_msg_extensions.filters.http.compressor.v3.Compressor: extensions.filters.http.compressor.v3.Compressor ------------------------------------------------ :repo:`[extensions.filters.http.compressor.v3.Compressor proto] ` .. code-block:: json :force: { "content_length": {...}, "content_type": [], "disable_on_etag_header": ..., "remove_accept_encoding_header": ..., "runtime_enabled": {...}, "compressor_library": {...}, "request_direction_config": {...}, "response_direction_config": {...}, "choose_first": ... } .. _envoy_v3_api_field_extensions.filters.http.compressor.v3.Compressor.content_length: content_length (`UInt32Value `_) Minimum response length, in bytes, which will trigger compression. The default value is 30. .. _envoy_v3_api_field_extensions.filters.http.compressor.v3.Compressor.content_type: content_type (**repeated** `string `_) Set of strings that allows specifying which mime-types yield compression; e.g., application/json, text/html, etc. When this field is not defined, compression will be applied to the following mime-types: "application/javascript", "application/json", "application/xhtml+xml", "image/svg+xml", "text/css", "text/html", "text/plain", "text/xml" and their synonyms. .. _envoy_v3_api_field_extensions.filters.http.compressor.v3.Compressor.disable_on_etag_header: disable_on_etag_header (`bool `_) If true, disables compression when the response contains an etag header. When it is false, the filter will preserve weak etags and remove the ones that require strong validation. .. _envoy_v3_api_field_extensions.filters.http.compressor.v3.Compressor.remove_accept_encoding_header: remove_accept_encoding_header (`bool `_) If true, removes accept-encoding from the request headers before dispatching it to the upstream so that responses do not get compressed before reaching the filter. .. attention:: To avoid interfering with other compression filters in the same chain use this option in the filter closest to the upstream. .. _envoy_v3_api_field_extensions.filters.http.compressor.v3.Compressor.runtime_enabled: runtime_enabled (:ref:`config.core.v3.RuntimeFeatureFlag `) Runtime flag that controls whether the filter is enabled or not. If set to false, the filter will operate as a pass-through filter, unless overridden by CompressorPerRoute. If not specified, defaults to enabled. .. _envoy_v3_api_field_extensions.filters.http.compressor.v3.Compressor.compressor_library: compressor_library (:ref:`config.core.v3.TypedExtensionConfig `, *REQUIRED*) A compressor library to use for compression. Currently only :ref:`envoy.compression.gzip.compressor` is included in Envoy. .. _extension_category_envoy.compression.compressor: .. tip:: This extension category has the following known extensions: - :ref:`envoy.compression.brotli.compressor ` - :ref:`envoy.compression.gzip.compressor ` - :ref:`envoy.compression.zstd.compressor ` The following extensions are available in :ref:`contrib ` images only: - :ref:`envoy.compression.qatzip.compressor ` - :ref:`envoy.compression.qatzstd.compressor ` .. _envoy_v3_api_field_extensions.filters.http.compressor.v3.Compressor.request_direction_config: request_direction_config (:ref:`extensions.filters.http.compressor.v3.Compressor.RequestDirectionConfig `) Configuration for request compression. Compression is disabled by default if left empty. .. _envoy_v3_api_field_extensions.filters.http.compressor.v3.Compressor.response_direction_config: response_direction_config (:ref:`extensions.filters.http.compressor.v3.Compressor.ResponseDirectionConfig `) Configuration for response compression. Compression is enabled by default if left empty. .. attention:: If the field is not empty then the duplicate deprecated fields of the ``Compressor`` message, such as ``content_length``, ``content_type``, ``disable_on_etag_header``, ``remove_accept_encoding_header`` and ``runtime_enabled``, are ignored. Also all the statistics related to response compression will be rooted in ``.compressor...response.*`` instead of ``.compressor...*``. .. _envoy_v3_api_field_extensions.filters.http.compressor.v3.Compressor.choose_first: choose_first (`bool `_) If true, chooses this compressor first to do compression when the q-values in ``Accept-Encoding`` are same. The last compressor which enables choose_first will be chosen if multiple compressor filters in the chain have choose_first as true. .. _envoy_v3_api_msg_extensions.filters.http.compressor.v3.Compressor.CommonDirectionConfig: extensions.filters.http.compressor.v3.Compressor.CommonDirectionConfig ---------------------------------------------------------------------- :repo:`[extensions.filters.http.compressor.v3.Compressor.CommonDirectionConfig proto] ` .. code-block:: json :force: { "enabled": {...}, "min_content_length": {...}, "content_type": [] } .. _envoy_v3_api_field_extensions.filters.http.compressor.v3.Compressor.CommonDirectionConfig.enabled: enabled (:ref:`config.core.v3.RuntimeFeatureFlag `) Runtime flag that controls whether compression is enabled or not for the direction this common config is put in. If set to false, the filter will operate as a pass-through filter in the chosen direction, unless overridden by CompressorPerRoute. If the field is omitted, the filter will be enabled. .. _envoy_v3_api_field_extensions.filters.http.compressor.v3.Compressor.CommonDirectionConfig.min_content_length: min_content_length (`UInt32Value `_) Minimum value of Content-Length header of request or response messages (depending on the direction this common config is put in), in bytes, which will trigger compression. The default value is 30. .. _envoy_v3_api_field_extensions.filters.http.compressor.v3.Compressor.CommonDirectionConfig.content_type: content_type (**repeated** `string `_) Set of strings that allows specifying which mime-types yield compression; e.g., application/json, text/html, etc. When this field is not defined, compression will be applied to the following mime-types: "application/javascript", "application/json", "application/xhtml+xml", "image/svg+xml", "text/css", "text/html", "text/plain", "text/xml" and their synonyms. .. _envoy_v3_api_msg_extensions.filters.http.compressor.v3.Compressor.RequestDirectionConfig: extensions.filters.http.compressor.v3.Compressor.RequestDirectionConfig ----------------------------------------------------------------------- :repo:`[extensions.filters.http.compressor.v3.Compressor.RequestDirectionConfig proto] ` Configuration for filter behavior on the request direction. .. code-block:: json :force: { "common_config": {...} } .. _envoy_v3_api_field_extensions.filters.http.compressor.v3.Compressor.RequestDirectionConfig.common_config: common_config (:ref:`extensions.filters.http.compressor.v3.Compressor.CommonDirectionConfig `) .. _envoy_v3_api_msg_extensions.filters.http.compressor.v3.Compressor.ResponseDirectionConfig: extensions.filters.http.compressor.v3.Compressor.ResponseDirectionConfig ------------------------------------------------------------------------ :repo:`[extensions.filters.http.compressor.v3.Compressor.ResponseDirectionConfig proto] ` Configuration for filter behavior on the response direction. .. code-block:: json :force: { "common_config": {...}, "disable_on_etag_header": ..., "remove_accept_encoding_header": ... } .. _envoy_v3_api_field_extensions.filters.http.compressor.v3.Compressor.ResponseDirectionConfig.common_config: common_config (:ref:`extensions.filters.http.compressor.v3.Compressor.CommonDirectionConfig `) .. _envoy_v3_api_field_extensions.filters.http.compressor.v3.Compressor.ResponseDirectionConfig.disable_on_etag_header: disable_on_etag_header (`bool `_) If true, disables compression when the response contains an etag header. When it is false, the filter will preserve weak etags and remove the ones that require strong validation. .. _envoy_v3_api_field_extensions.filters.http.compressor.v3.Compressor.ResponseDirectionConfig.remove_accept_encoding_header: remove_accept_encoding_header (`bool `_) If true, removes accept-encoding from the request headers before dispatching it to the upstream so that responses do not get compressed before reaching the filter. .. attention:: To avoid interfering with other compression filters in the same chain use this option in the filter closest to the upstream. .. _envoy_v3_api_msg_extensions.filters.http.compressor.v3.ResponseDirectionOverrides: extensions.filters.http.compressor.v3.ResponseDirectionOverrides ---------------------------------------------------------------- :repo:`[extensions.filters.http.compressor.v3.ResponseDirectionOverrides proto] ` Per-route overrides of ``ResponseDirectionConfig``. Anything added here should be optional, to allow overriding arbitrary subsets of configuration. Omitted fields must have no effect. .. code-block:: json :force: { "remove_accept_encoding_header": {...} } .. _envoy_v3_api_field_extensions.filters.http.compressor.v3.ResponseDirectionOverrides.remove_accept_encoding_header: remove_accept_encoding_header (`BoolValue `_) If set, overrides the filter-level :ref:`remove_accept_encoding_header`. .. _envoy_v3_api_msg_extensions.filters.http.compressor.v3.CompressorOverrides: extensions.filters.http.compressor.v3.CompressorOverrides --------------------------------------------------------- :repo:`[extensions.filters.http.compressor.v3.CompressorOverrides proto] ` Per-route overrides. As per-route overrides are needed, they should be added here, mirroring the structure of ``Compressor``. All fields should be optional, to allow overriding arbitrary subsets of configuration. .. code-block:: json :force: { "response_direction_config": {...} } .. _envoy_v3_api_field_extensions.filters.http.compressor.v3.CompressorOverrides.response_direction_config: response_direction_config (:ref:`extensions.filters.http.compressor.v3.ResponseDirectionOverrides `) If present, response compression is enabled. .. _envoy_v3_api_msg_extensions.filters.http.compressor.v3.CompressorPerRoute: extensions.filters.http.compressor.v3.CompressorPerRoute -------------------------------------------------------- :repo:`[extensions.filters.http.compressor.v3.CompressorPerRoute proto] ` .. code-block:: json :force: { "disabled": ..., "overrides": {...} } .. _envoy_v3_api_field_extensions.filters.http.compressor.v3.CompressorPerRoute.disabled: disabled (`bool `_) If set, the filter will operate as a pass-through filter. Overrides Compressor.runtime_enabled and CommonDirectionConfig.enabled. Precisely one of :ref:`disabled `, :ref:`overrides ` must be set. .. _envoy_v3_api_field_extensions.filters.http.compressor.v3.CompressorPerRoute.overrides: overrides (:ref:`extensions.filters.http.compressor.v3.CompressorOverrides `) Per-route overrides. Fields set here will override corresponding fields in ``Compressor``. Precisely one of :ref:`disabled `, :ref:`overrides ` must be set.