Compressor

    As of Envoy v1.18 the v2 API has been removed and is no longer supported.

    If you are upgrading from v2 API config you may wish to view the v2 API documentation:

    This extension may be referenced by the qualified name

    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:

    Compressor .

    [extensions.filters.http.compressor.v3.Compressor proto]

    content_length

    () Minimum response length, in bytes, which will trigger compression. The default value is 30.

    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.

    disable_on_etag_header

    () 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.

    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.

    To avoid interfering with other compression filters in the same chain use this option in the filter closest to the upstream.

    runtime_enabled

    () Runtime flag that controls whether the filter is enabled or not. If set to false, the filter will operate as a pass-through filter. If not specified, defaults to enabled.

    compressor_library

    (config.core.v3.TypedExtensionConfig, REQUIRED) A compressor library to use for compression. Currently only is included in Envoy.

    Tip

    This extension category has the following known extensions:

    request_direction_config

    () Configuration for request compression. Compression is disabled by default if left empty.

    response_direction_config

    (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 <stat_prefix>.compressor.<compressor_library.name>.<compressor_library_stat_prefix>.response.* instead of <stat_prefix>.compressor.<compressor_library.name>.<compressor_library_stat_prefix>.*.

    enabled

    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.

    content_type

    (repeated ) 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.

    [extensions.filters.http.compressor.v3.Compressor.RequestDirectionConfig proto]

    Configuration for filter behavior on the request direction.

    common_config

    ()

    [extensions.filters.http.compressor.v3.Compressor.ResponseDirectionConfig proto]

    Configuration for filter behavior on the response direction.

    common_config

    ()

    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.

    remove_accept_encoding_header

    () 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.