I noticed that heroku injects rails3_serve_static_assets into Cedar when serve_static_assets set to false. All I found on this is this init script , which matches the name given in the Heroku deployment, and all this again activates the static asset service.
I am trying to find more information on how Heroku maintains these assets because they don't seem to just appear directly from the Rails application.
When I look at the headers of the js file, they look something like this:
Age:0 Connection:close Content-Encoding:gzip Content-Type:text/css Date:Sun, 08 Jan 2012 19:04:05 GMT Last-Modified:Sat, 07 Jan 2012 23:43:30 GMT Server:nginx/0.7.67 Transfer-Encoding:Identity Via:1.1 varnish X-Varnish:677359987
I assume that Via:1.1 varnish means that these assets are served through Varnish, but with online documentation . on this occasion, says that Lac is not available on Cedar.
Cedar docs on gzipped answers (below) indicate that:
Since requests to Cedar applications are created directly on the application server - not proxied through an HTTP server, such as nginx - any response compression should be performed in your application.
However, we can clearly see that the gzip'd asset matches Content-Encoding . Now I'm pretty sure that Rails 3.0.x does not have Rack::Deflater enabled (it does not appear in rake middleware yet), so I'm a little confused as to how this resource is gzip'd.
This is a kind of preliminary pointer to my next question regarding servicing these assets through Cloudfront, but my question is here:
Can someone explain what exactly is happening in Cedar re: static assets. Namely, what serves my assets (Rails, Ngnix, Varnish?) And what are their gzip'ng?