Request Decompress Configuration
The request-decompress plugin decompresses a gzip or deflate request body so that the plugins on the route and, optionally, the upstream service receive the plain body. Configuration covers plugin parameters.
Parameters
See plugin common configurations for configuration options available to all plugins.
max_req_body_size
valid value:
>= 1Maximum size in bytes for both the encoded request body and the decompressed result. The gateway rejects either one with
413when it exceeds this value.The limit is enforced while the body is read and decompressed, so an oversized result is not buffered in full. Requests without a
Content-Encodingheader are not read or checked by this plugin. Setnginx_config.http.client_max_body_sizein the gateway'sconfig.yamlfor a gateway-wide limit, or use theclient-controlplugin to set a limit on a route or service.forward_compressed
If true, plugins that run after
request-decompressand before the request is proxied receive the decompressed body, while the upstream receives compressed data. The plugin restores the original bytes when the body is unchanged and recompresses it when another plugin modifies it.Log-phase plugins read the same compressed body that was sent upstream.