# Spotlight serves assets from the public directory
# of the currently deployed version of the app.
location /spotlight/ {
  expires 1m;
  rewrite ^/spotlight(.*)$ $1 break;
  root /opt/spotlight/current/public;
  gzip on;
  gzip_types application/x-javascript application/javascript application/json text/css;
  gzip_proxied no_etag;
  gzip_vary on;
  }

location /stagecraft/ {
  expires 1h;
  rewrite ^/stagecraft(.*)$ $1 break;
  root /opt/stagecraft/current/assets;
  gzip on;
  gzip_types application/x-javascript application/javascript application/json text/css;
  gzip_proxied no_etag;
  gzip_vary on;
}

# Spotlight serves assets from the public directory
# of the currently deployed version of the app.
location /spotlight/ {
  expires 30d;
  rewrite ^/spotlight(.*)$ $1 break;
  root /opt/spotlight/current/public;
  gzip on;
  gzip_types application/x-javascript application/javascript application/json text/css;
  gzip_proxied no_etag;
  gzip_vary on;
  }

location /stagecraft/ {
  expires 1h;
  rewrite ^/stagecraft(.*)$ $1 break;
  root /opt/stagecraft/current/assets;
  gzip on;
  gzip_types application/x-javascript application/javascript application/json text/css;
  gzip_proxied no_etag;
  gzip_vary on;
}

Fix cache time for Spotlight assets
Fix cache time for Spotlight assets

1m is 1 minute, not 1 month.

30d is 30 days, which is 1 month.

Documentation: http://nginx.org/en/docs/syntax.html
