ncr / rack-proxy

A request/response rewriting HTTP proxy. A Rack app.
MIT License
269 stars 94 forks source link

can't change the protocol in the request #40

Closed jp closed 9 years ago

jp commented 10 years ago

I didn't find a way to change the protocol in the request when the incoming protocol is different than the proxied service. Is there a solution for this ?

mcmire commented 10 years ago

I believe you can set a header (specifically a key in the env) for this. Rack::Request#scheme picks up on:

jp commented 9 years ago

That's correct, adding the following made it work :

headers["HTTPS"]='on'

Even better with the following :

env["rack.ssl_verify_none"] = true

Thanks @mcmire