diff options
author | Eric Wong <e@80x24.org> | 2016-02-13 22:44:48 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-02-13 22:46:49 +0000 |
commit | 631c3b6fd3e0b944b900d181cb51a8c847c14c09 (patch) | |
tree | 86ba595dbdcfa4866952c3a5ba99182c9316ec4e /lib | |
parent | a4400935d2db7028420a216f735d4d4029f985d4 (diff) | |
download | yahns-631c3b6fd3e0b944b900d181cb51a8c847c14c09.tar.gz |
This allows backend application servers to set "rack.url_scheme" as appropriate using Rack::Request#scheme. Plack/PSGI users can also take advantage of this using Plack::Middleware::ReverseProxy
Diffstat (limited to 'lib')
-rw-r--r-- | lib/yahns/proxy_pass.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/yahns/proxy_pass.rb b/lib/yahns/proxy_pass.rb index 3b68f01..511db02 100644 --- a/lib/yahns/proxy_pass.rb +++ b/lib/yahns/proxy_pass.rb @@ -226,6 +226,7 @@ class Yahns::ProxyPass # :nodoc: end req = "#{env['REQUEST_METHOD']} #{req} #{ver}\r\n" \ + "X-Forwarded-Proto: #{env['rack.url_scheme']}\r\n" \ "X-Forwarded-For: #{env["REMOTE_ADDR"]}\r\n".dup # pass most HTTP_* headers through as-is |