Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding :strip_headers option to matcher and reverse_proxy_options #22

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

bvandgrift
Copy link

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.

@travisbot
Copy link

This pull request passes (merged 6fab378 into 611c775).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants