# See https://httpd.apache.org/docs/2.4/en/mod/mod_brotli.html
# for configuration directive explanation and more!
# Load mod_brotli!
LoadModule brotli_module modules/mod_brotli.so
<IfModule mod_brotli.c>
# Let ETags point out the data was compressed with brotli (default AddSuffix, other options: NoChange, Remove)
BrotliAlterETag AddSuffix
# Set the max input block to the minimum, to save on server memory (16-24, default automatic)
BrotliCompressionMaxInputBlock 16
# Set the compression quality level, lower will be faster but worse compression (0-11, default 5)
BrotliCompressionQuality 5
# Set the compression window size, larger is better quality, but needs more memory (10-24, default 18)
BrotliCompressionWindow 18
# See the documentation for BrotliFilterNote if you want to log input/output/ratio numbers:
# https://httpd.apache.org/docs/2.4/en/mod/mod_brotli.html#brotlifilternote
# Globally configure to compress common text types!
AddOutputFilterByType BROTLI_COMPRESS text/html text/plain text/xml text/css text/javascript application/javascript
</IfModule>