]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/web/templates/default/apache.frontend.erb
Enable gzip compression of SVG assets
[chef.git] / cookbooks / web / templates / default / apache.frontend.erb
index d0260be3dcdfba512676dfbc4419e60e71c7ba02..aa2aa1d98dc38565c28aaea24ca6a210f0b229a5 100644 (file)
@@ -20,7 +20,7 @@
   #
   # Setup logging
   #
-  LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\" %Ts" combined_with_time
+  LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\" %Dus %{UNIQUE_ID}e %{SSL_PROTOCOL}x %{SSL_CIPHER}x" combined_with_time
   CustomLog /var/log/apache2/access.log combined_with_time
   ErrorLog /var/log/apache2/error.log
 
   ExpiresActive On
   RewriteEngine on
 
+  #
+  # Configure on the fly compression
+  #
+  AddOutputFilterByType DEFLATE image/svg+xml
+
   #
   # Add the unique ID to the request headers
   #
   RewriteCond %{HTTP_USER_AGENT} tilesAtHome
   RewriteRule . - [F,L]
 
+  #
+  # Block changeset scraper
+  #
+  RewriteCond %{HTTP_USER_AGENT} "OSMApp Tuner"
+  RewriteRule . - [F,L]  
+
   #
   # Block requests for the old 404 map tile
   #