Rack middleware for processing SSI based on the nginx HttpSsiModule.
Directives currently supported: block
and include
Add this line to your application's Gemfile:
gem 'rack_ssi'
And then execute:
$ bundle
Or install it yourself as:
$ gem install rack_ssi
require 'rack_ssi'
configure do
use Rack::SSI, {
:logging => :on,
:when => lambda {|env| not env['SOME_CUSTOM_HEADER'] == 'ON'},
:locations => {
%r{^/includes} => "http://includes.mydomain.com"
}
}
end
config.middleware.use Rack::SSI, { ... }