INTEGRITY Cloudflare Docs

Compression Rules settings

Compression Rules support the configuration settings covered in the following sections.

Dashboard configuration settings

Enable Zstandard (Zstd) compression Beta

Sets Zstandard as the preferred compression algorithm. If it is not supported, will automatically fall back to Brotli, Gzip, or uncompressed data.

Enable Brotli and Gzip compression

Enables Cloudflare's default compression setting. Brotli is the preferred compression algorithm. It will automatically fall back to Gzip or to uncompressed data.

Disable compression

Disables compression for matching requests. Also disables Cloudflare's default compression behavior.

Custom

Defines a custom order for compression algorithms.

Allowed values are the following:

If you specify only Gzip, Brotli, or Zstandard and no algorithm matches, the response will have no compression. To configure a fallback compression mechanism, add Auto to the list.


API configuration settings

The configuration object supported by the compress_response action has the following format:

"action_parameters": {
  "algorithms": [
    { "name": "<VALUE1>" },
    { "name": "<VALUE2>" },
    // ...
  ]
}

The algorithms list must contain at least one item.

The supported algorithm values are:

If you include none, default, or auto in the list, it must be the last value in the list.

When you specify only the gzip, brotli, or zstd algorithms, if no algorithm matches then the response will have no compression. To configure a fallback compression mechanism, add auto to the list.

For API examples, refer to the Examples gallery.