Ruby on Rails Thursday, January 14, 2016

I'm using Rails api with an angularjs front-end which is served simply as static files under public directory (no sprockets or rails assets pipeline involved).

I've chosen passenger as the app server, deployed to heroku and everything seems to be working fine except for caching.

Since static assets are served directly by passenger/nginx, I'm thinking this has nothing to do with rails,  is this correct?

But I have no idea how to set cache headers or where to add configurations.


Response headers when requesting a static file (application-a24e9c3607.js):


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

Any help appreciated. Thanks.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/8e20b5be-209e-42f0-813c-b3a197e4975f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment