Skip to content

Instantly share code, notes, and snippets.

@kalupa
Created October 26, 2011 18:48
Show Gist options
  • Save kalupa/1317366 to your computer and use it in GitHub Desktop.
Save kalupa/1317366 to your computer and use it in GitHub Desktop.
Rails 3.1 Asset Pipeline nginx configuration changes
location ~ ^/assets/ {
expires 1y;
add_header Cache-Control public;
# Some browsers still send conditional-GET requests if there's a
# Last-Modified header or an ETag header even if they haven't
# reached the expiry date sent in the Expires header.
add_header Last-Modified "";
add_header ETag "";
break;
}
location ~ ^/assets/ {
expires 1y;
add_header Cache-Control public;
# Some browsers still send conditional-GET requests if there's a
# Last-Modified header or an ETag header even if they haven't
# reached the expiry date sent in the Expires header.
add_header Last-Modified "";
add_header ETag "";
break;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment