]> git.openstreetmap.org Git - chef.git/commitdiff
Enable gzip compression of SVG assets
authorTom Hughes <tom@compton.nu>
Sun, 13 Sep 2015 10:39:48 +0000 (11:39 +0100)
committerTom Hughes <tom@compton.nu>
Sun, 13 Sep 2015 10:39:48 +0000 (11:39 +0100)
cookbooks/dev/recipes/default.rb
cookbooks/dev/templates/default/apache.apis.erb
cookbooks/web/templates/default/apache.frontend.erb

index 2e51fa54625a26775ad04a33fc60b7f95476101d..014d9fafd0f4059e79241a14acc482098f22ba59 100644 (file)
@@ -59,6 +59,7 @@ nodejs_package "svgo"
 easy_install_package "geojson"
 
 apache_module "env"
+apache_module "deflate"
 apache_module "expires"
 apache_module "proxy"
 apache_module "proxy_fcgi"
index 1afec5c9338659e7559d70e234813af5b2a1cb9e..3a7a5868837205df02c93dda8e7987232a4ee563 100644 (file)
@@ -8,6 +8,8 @@
 
        CustomLog /var/log/apache2/apis.dev.openstreetmap.org-access.log combined
        ErrorLog /var/log/apache2/apis.dev.openstreetmap.org-error.log
+
+        AddOutputFilterByType DEFLATE image/svg+xml
 </VirtualHost>
 
 <Directory /srv/apis.dev.openstreetmap.org>
index 5c149872e9f63c8097fc6d1ce97cba59184c6a33..aa2aa1d98dc38565c28aaea24ca6a210f0b229a5 100644 (file)
   ExpiresActive On
   RewriteEngine on
 
+  #
+  # Configure on the fly compression
+  #
+  AddOutputFilterByType DEFLATE image/svg+xml
+
   #
   # Add the unique ID to the request headers
   #