rack-esi

Rack-ESI is a Nokogiri based ESI middleware implementation for Rack with support for include tags, all other ESI namespaced nodes are just removed.

To make this gem work you must define the xmlns:esi namespace in your text/html response.

Note: This gem should only be used in development. For production use setup varnish or any other ESI enabled server.

Features

Dependencies

Setup

w/o Gemfile

$ gem install rack-esi

w/ Gemfile

gem 'rack-esi'

... and ...

$ bundle

rackup

use Rack::ESI, options || {}
run Application.new

Rails 2.3: environment.rb

... for setups w/o Gemfile

config.gem 'rack-esi'

... and ...

config.middleware.insert Rack::Lock, Rack::ESI

Rails 3.x: application.rb

config.middleware.insert ActionDispatch::Static, Rack::ESI

Options

TODO

Note on Patches/Pull Requests

Thanks

tenderlove and Qerub

Copyright

Copyright (c) 2011 Florian AƟmann. See LICENSE for details.