CallMeTechie
DE Login
Home Products Blog About Contact

Enable Compression

🚀 Installation & Setup · Updated 1 month ago

Setup

Via the UI

The toggle sits in the route wizard in Step 2 — Transport, next to Force HTTPS and Backend HTTPS.

  1. Create or edit a route
  2. In Step 2 enable the Compression toggle
  3. Save

There are no other options — Zstd, Brotli and Gzip are automatically active.

Via the API

# Enable Compression
curl -X PUT https://gatecontrol.example.com/api/v1/routes/1 \
  -H "Authorization: Bearer gc_..." \
  -H "Content-Type: application/json" \
  -d '{
    "compress_enabled": true
  }'

Important notes

  • Not recommended for already compressed content. Images (JPEG, PNG, WebP), videos (MP4, WebM), archives (ZIP, tar.gz) and fonts (WOFF2) are already compressed. Compression wastes CPU time and sometimes even grows them minimally.
  • Caddy only compresses if the client sends Accept-Encoding. Older or specialized HTTP clients without this header receive uncompressed responses.
  • Compression slightly increases CPU load on the GateControl server. With very high traffic and large responses, this can become relevant.
  • Streaming responses (e.g. server-sent events, chunked transfer) are also compressed, but can have higher latency since the encoder waits for enough data to compress.
  • Compression is only available for HTTP routes, not for L4 (TCP/UDP).
  • If the backend itself already delivers compressed responses (Content-Encoding: gzip), Caddy does not double-compress.

See also

Cookie Settings

We use cookies to improve your experience. Essential cookies are always active.

Privacy Policy
ESC
↑↓ navigate open esc close