# 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[​](#parameters "Direct link to Parameters")

See plugin [common configurations](https://docs.api7.ai/apisix/reference/plugin-common-configurations.md) for configuration options available to all plugins.

* max\_req\_body\_size

  integer

  default: `1048576`

  valid value:

  \>= 1

  ***

  Maximum size in bytes for both the encoded request body and the decompressed result. The gateway rejects either one with `413` when 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-Encoding` header are not read or checked by this plugin. Set `nginx_config.http.client_max_body_size` in the gateway's `config.yaml` for a gateway-wide limit, or use the [`client-control`](https://docs.api7.ai/hub/client-control.md) plugin to set a limit on a route or service.

* forward\_compressed

  boolean

  default: `false`

  ***

  If true, plugins that run after `request-decompress` and 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.
