nginx fix expiry to actually work on images/javascripts/etc
This commit is contained in:
parent
d2c83d07d8
commit
1f399ffd85
1 changed files with 10 additions and 11 deletions
|
@ -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 / {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue