Prefer brotli on the theme host, and correct the previous rationale

OtherKlusterServices
Shipped
August 20, 2026 at 10:52 PM UTC
Author
Kamo
Commit
584b84a

Two things, one of them a correction to the commit before this. The previous commit justified `encodings: [br, gzip]` with a probe against api.kamocrm.com. That probe was wrong. APIService sets `server.compression.enabled: true` in its ConfigMap — note its repo application.yml says false, the ConfigMap is what runs — so the origin had already gzipped and Traefik was passing the body through untouched. Every number in that comment was Spring's, attributed to Traefik. The comment now says so explicitly, because the mistake is easy to repeat: almost every origin behind that chain self-compresses, so probing them shows gzip and looks like Traefik choosing gzip. The claim itself survives, measured properly. The theme host is the one place Traefik is provably the compressor, because MinIO serves stored bytes and negotiates nothing. On the chat widget bundle, 145,587 bytes as stored: Accept-Encoding: gzip -> gzip 45,501 Accept-Encoding: br, gzip -> gzip 45,501 Accept-Encoding: gzip, deflate, br, zstd -> gzip 45,501 Accept-Encoding: br -> br 40,754 Accept-Encoding: * -> none 145,587 The second line is the finding: brotli requested FIRST still returns gzip. Traefik ignores the client's ordering and takes gzip whenever it is acceptable, so no browser has ever received the smaller encoding. The last line is a second defect — with no `encodings` set there is nothing for a wildcard to resolve to, so `*` got no compression at all. That is 10.4% of a bundle that loads on customers' own sites, so `theme-compress` gets the same encodings and minimum as the shared middleware. minResponseBodyBytes is documented as pinning a default rather than changing behaviour: 1024 is already Traefik's default, confirmed by the 483-byte widget loader passing through uncompressed with no setting. Verified live after the previous deploy: the middleware carries `encodings` (so the v3.3 CRD update did its job and the field was not pruned), an `Accept-Encoding: *` request returns br, and the PNG that used to come back 30 bytes larger than source is now untouched.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing