Expand description

Gzip and Brotli response compression.

See the Compression and Compress types for further details.

Security Implications

In some cases, HTTP compression on a site served over HTTPS can make a web application vulnerable to attacks including BREACH. These risks should be evaluated in the context of your application before enabling compression.

Structs

Compresses all responses with Brotli or Gzip compression. Caches compressed response bodies in memory for selected file types/path suffixes, useful for compressing large compiled JS/CSS files, OTF font packs, etc. Note that all cached files are held in memory indefinitely.
Compresses responses with Brotli or Gzip compression using the async-compression crate.
Compresses all responses with Brotli or Gzip compression.

Enums