X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/1f399ffd8591835c0315bae25c5f48f6060e12c7..2483dcc4bb392ea53da517e28ca9a82590ba435c:/config/nginx.conf diff --git a/config/nginx.conf b/config/nginx.conf index 1da97a6d5..5071a260b 100644 --- a/config/nginx.conf +++ b/config/nginx.conf @@ -157,15 +157,20 @@ http { # Strip asset tags location ~ ^/(images|javascripts|openlayers|stylesheets|user/image)/ { + # Strip asset tags rewrite ^/(.*)/[0-9]+$ /$1; + + # Set expiry to the maximum - the asset tag will change + # when there is a new version expires max; - # Handle Special Case Expiry + # Only cache OpenLayers for seven days though if ($uri ~ ^/openlayers/) { expires 7d; } } - # Handle Special Case Expiry + + # Cache the embedded map page for seven days location ~ ^/export/embed.html$ { expires 7d; }