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

Preserve RequestHeaders #53

Open
danazkari opened this issue Jun 26, 2015 · 0 comments
Open

Preserve RequestHeaders #53

danazkari opened this issue Jun 26, 2015 · 0 comments

Comments

@danazkari
Copy link

Hi, I'm using this project to redirect requests in an existing heroku app that has been moved to a more powerful cluster.

Redirects occur fine but I need one of the headers that the devices are sending to heroku, to be sent to the cluster where the proxy is pointing at.

(I'm not a ruby dev so please bear with me)

config.ru (if it helps)

require 'rack/reverse_proxy'

use Rack::ReverseProxy do
  reverse_proxy_options :preserve_host => true
  reverse_proxy '/', 'http://example.com'
end

app = proc do |env|
  [ 200, {'Content-Type' => 'application/json'}, "b" ]
end

run app
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

No branches or pull requests

1 participant