mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 00:24:39 +08:00

This enables on-the-fly brotli compression at level 4 for all responses which we currently gzip. This level should provide slightly improved file sizes when compared to gzip, as well as slightly faster processing times. This is the [level which Cloudflare use](https://blog.cloudflare.com/results-experimenting-brotli/) for dynamic responses. When compared to our existing gzip level-5 configuration, our own experiments confirm that it provides slightly faster compression, with slightly smaller file sizes. For static assets which are cached by CDNs/browsers, we use brotli level 6 for an even better compression ratio.