How to "prefer" brotli over gzip?

I've read the docs regarding compression, and it states...

...but it doesn't stipulate the actual criteria that determine which compression method is used. Both gzip and brotli are present in the Accept-Encoding header of the request, but Traefik always uses gzip.

Is there a way to force it to use brotli? Might it have to do with the order in which they appear? Do I need to rewrite the header with brotli first?

Thanks for any info or insights.

Hi @shot, thanks for your interest in Traefik!

What version of Traefik do you use?

Brotli is supported from Traefik v3 on.

Traefik v2 supports gzip but not brotli.

If in v3, a header contains both, brotli and gzip, Traefik will preference brotli over gzip.

Oh, I'm using 2.10.4. I assumed the docs (which state that brotli is supported) pertained to the latest stable release. I guess that explains it. Thanks much!