nginx fix expiry to actually work on images/javascripts/etc

This commit is contained in:
Grant Slater 2009-04-21 02:42:29 +00:00
parent d2c83d07d8
commit 1f399ffd85

View file

@ -158,6 +158,16 @@ http {
# Strip asset tags
location ~ ^/(images|javascripts|openlayers|stylesheets|user/image)/ {
rewrite ^/(.*)/[0-9]+$ /$1;
expires max;
# Handle Special Case Expiry
if ($uri ~ ^/openlayers/) {
expires 7d;
}
}
# Handle Special Case Expiry
location ~ ^/export/embed.html$ {
expires 7d;
}
# Include fastcgi configuration
@ -205,17 +215,6 @@ http {
return 404;
}
# Handle Special Case Expiry
location ~ ^/openlayers/ {
expires 7d;
}
location ~ ^/export/embed.html$ {
expires 7d;
}
location ~ ^/(images|javascripts|stylesheets)/ {
expires max;
}
# Send everything else to the web backend unless it exists
# in the rails public tree
location / {