Skip to content

Preserve RequestHeaders #53

@danazkari

Description

@danazkari

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions