Created
October 31, 2012 16:59
-
-
Save noctivityinc/3988290 to your computer and use it in GitHub Desktop.
nginx add for rails 3.1 and above with paperclip support
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location ~* ^/(assets|images|javascripts|system)/ { | |
# Per RFC2616 - 1 year maximum expiry | |
# http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html | |
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. | |
# Do NOT unset Last-Modified! | |
# 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