Skip to content

Instantly share code, notes, and snippets.

@mhaylock
Created May 27, 2011 11:11
Show Gist options
  • Save mhaylock/995049 to your computer and use it in GitHub Desktop.
Save mhaylock/995049 to your computer and use it in GitHub Desktop.
nginx config to add Cache-Control header to rails static cache files
location / {
try_files /system/maintenance.html $uri $uri/index.html $uri.html @passenger;
expires 60s;
add_header Cache-Control public;
add_header Vary Accept-Encoding;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment