For future reference:
To set expires headers on responses coming from your /assets path:
Add rack-contrib to your Gemfile
In config.ru, before your "run":
[sourcecode language="ruby"] require 'rack/contrib' use Rack::StaticCache, :urls => ['/assets', '/images', '/javascripts'], :root => 'public' [/sourcecode]
The default is one year. For two, add :duration => 2 after the :urls specification.
That is all.
comments powered by Disqus