]> git.openstreetmap.org Git - rails.git/blobdiff - config/nginx.conf
Strip asset tags from public files.
[rails.git] / config / nginx.conf
index b9055c2d38bb951717ce880e5ef1b1f2c53f5441..bd43f4c35bad85dfc5649b6c02a10962c2958234 100644 (file)
@@ -148,6 +148,11 @@ http {
             rewrite ^/(0\.[0-9]+)/(.*)$ /api/$1/$2;
         }
     
             rewrite ^/(0\.[0-9]+)/(.*)$ /api/$1/$2;
         }
     
+        # Strip asset tags
+        location ~ ^/(images|javascripts|openlayers|stylesheets)/ {
+            rewrite ^/(.*)/[0-9]+$ /$1;
+        }
+
         # Handle tiles@home requests
         location /api/ {
             if ($http_user_agent ~ "^tilesAtHome") {
         # Handle tiles@home requests
         location /api/ {
             if ($http_user_agent ~ "^tilesAtHome") {