Rails + Passenger on Heroku: How to set expiry date or a maximum age in the HTTP headers for static resources?
<p>I'm using Rails api with an angularjs front-end which is served simply as static files under <code>public</code> directory. I've chosen passenger as the app server, deployed to heroku and everything seems to be working fine except for caching.</p>

<p>Since static assets are served by passenger/nginx, I believe this has nothing to do with rails. But I have no idea how to get it working or where to add configurations.</p>

<p>Response headers when requesting a static file (<strong>application-a24e9c3607.js</strong>):</p>

<pre><code>Connection: keep-alive
Content-Length: 0
Date: Thu, 14 Jan 2016 06:45:31 GMT
Etag: "5696ce02-43102"
Last-Modified: Wed, 13 Jan 2016 22:21:54 GMT
Server: nginx/1.8.0
Via: 1.1 vegur
</code></pre>