rack-reverse-proxy icon indicating copy to clipboard operation
rack-reverse-proxy copied to clipboard

adding :strip_headers option to matcher and reverse_proxy_options

Open bvandgrift opened this issue 12 years ago • 1 comments

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.

bvandgrift avatar Aug 29 '12 17:08 bvandgrift

This pull request passes (merged 6fab3789 into 611c7758).

travisbot avatar Aug 29 '12 17:08 travisbot