From f2fb9bfa575dfe8de24a4153333e033860270780 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sun, 3 Jul 2022 20:42:29 +0100 Subject: [PATCH] Enable mod_brotli for the same content types as mod_deflate --- cookbooks/apache/recipes/default.rb | 4 ++++ cookbooks/apache/templates/default/brotli.conf.erb | 12 ++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 cookbooks/apache/templates/default/brotli.conf.erb 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 + + -- 2.39.5