]> git.openstreetmap.org Git - chef.git/commitdiff
Enable mod_brotli for the same content types as mod_deflate
authorTom Hughes <tom@compton.nu>
Sun, 3 Jul 2022 19:42:29 +0000 (20:42 +0100)
committerTom Hughes <tom@compton.nu>
Sun, 3 Jul 2022 19:42:29 +0000 (20:42 +0100)
cookbooks/apache/recipes/default.rb
cookbooks/apache/templates/default/brotli.conf.erb [new file with mode: 0644]

index d443f1e409ce5eff9c76c861ca67f2bddb176583..c927b87b5015c539583bc19dde39c1162f542421 100644 (file)
@@ -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 (file)
index 0000000..7000e59
--- /dev/null
@@ -0,0 +1,12 @@
+# DO NOT EDIT - This file is being maintained by Chef
+
+<IfModule mod_deflate.c>
+        <IfModule mod_filter.c>
+                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
+        </IfModule>
+</IfModule>