jaswope/rack-reverse-proxy — pull request #22 by bvandgrift (2012-08-29 17:48:44+00:00)
Title: adding :strip_headers option to matcher and reverse_proxy_options

When using reverse-proxy to retrieve embedded file attachments from Riak, we found it necessary to screen certain headers from being emitted. I've written this in, with tests, and offer it to you for your consideration. I've updated the README to reflect the changes, but here they are in short:

use Rack::ReverseProxy do
# Set :strip_headers to remove headers that should not be passed along
reverse_proxy_options :preserve_host => true, :strip_headers => ['REFERER']

# Alternatively
reverse_proxy '/test', 'http://example.com/', { :strip_headers => ['REFERER'] }
end

Thanks.