Rack middleware for Sinatra that disables cookies when content being served is a static asset. Some HTTP accelerators (particularly Varnish) will not cache when Set-Cookie is present. This prevents files from not being cached. It is kind of a hack.
Installation and Usage
gem install sinatra-
require 'sinatra' require 'sinatra/cookie_thief' register :: enable :sessions
require 'sinatra/base' class App < ::Base register :: enable :sessions end
Send a pull request! Note that there are tests to demonstrate the current behavior.