From: Tom Hughes Date: Sun, 3 Jul 2022 19:42:29 +0000 (+0100) Subject: Enable mod_brotli for the same content types as mod_deflate X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/f2fb9bfa575dfe8de24a4153333e033860270780 Enable mod_brotli for the same content types as mod_deflate --- diff --git a/cookbooks/apache/recipes/default.rb b/cookbooks/apache/recipes/default.rb index d443f1e40..c927b87b5 100644 --- a/cookbooks/apache/recipes/default.rb +++ b/cookbooks/apache/recipes/default.rb @@ -71,6 +71,10 @@ apache_module "status" do variables :hosts => admins["hosts"] end +apache_module "brotli" do + conf "brotli.conf.erb" +end + apache_module "deflate" do conf "deflate.conf.erb" end diff --git a/cookbooks/apache/templates/default/brotli.conf.erb b/cookbooks/apache/templates/default/brotli.conf.erb new file mode 100644 index 000000000..7000e590e --- /dev/null +++ b/cookbooks/apache/templates/default/brotli.conf.erb @@ -0,0 +1,12 @@ +# DO NOT EDIT - This file is being maintained by Chef + + + + AddOutputFilterByType BROTLI_COMPRESS text/html text/plain text/xml + AddOutputFilterByType BROTLI_COMPRESS text/css + AddOutputFilterByType BROTLI_COMPRESS application/x-javascript application/javascript application/ecmascript + AddOutputFilterByType BROTLI_COMPRESS application/rss+xml + AddOutputFilterByType BROTLI_COMPRESS application/xml + AddOutputFilterByType BROTLI_COMPRESS image/svg+xml + +