X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/7bbae8df4e187f39241b081777323ab9f55f963e..3bcff805711e0fae3d5509d1f68edf7e605e4048:/cookbooks/matomo/templates/default/apache.erb
diff --git a/cookbooks/matomo/templates/default/apache.erb b/cookbooks/matomo/templates/default/apache.erb
index 589d563d6..5b503cae6 100644
--- a/cookbooks/matomo/templates/default/apache.erb
+++ b/cookbooks/matomo/templates/default/apache.erb
@@ -57,18 +57,27 @@
ExpiresActive On
RewriteEngine on
- RewriteCond "%{HTTP:Accept-encoding}" "gzip"
+ RewriteCond "%{HTTP:Accept-Encoding}" "br"
+ RewriteCond "%{REQUEST_FILENAME}\.br" -s
+ RewriteRule "^(.*)\.js" "$1\.js\.br" [QSA]
+
+ RewriteCond "%{HTTP:Accept-Encoding}" "gzip"
RewriteCond "%{REQUEST_FILENAME}\.gz" -s
RewriteRule "^(.*)\.js" "$1\.js\.gz" [QSA]
- RewriteRule "\.js\.gz$" "-" [T=text/javascript,E=no-gzip:1]
+ RewriteRule "\.js\.(br|gz)$" "-" [T=text/javascript,E=no-gzip:1,E=no-brotli:1]
+
+
+ Header append Content-Encoding br
+ Header append Vary Accept-Encoding
+
Header append Content-Encoding gzip
Header append Vary Accept-Encoding
-
+
ExpiresDefault "access plus 1 week"
Header set Cache-Control "max-age=604800"