diff options
author | Samuel Williams <samuel.williams@oriontransfer.co.nz> | 2020-02-06 16:48:51 +1300 |
---|---|---|
committer | Samuel Williams <samuel.williams@oriontransfer.co.nz> | 2020-02-08 00:52:30 +1300 |
commit | 3802c2ad5561872e72ca08809aeab5f067d2646f (patch) | |
tree | 3ef0cb29278bf890bfece79959e26e2bed6da13e | |
parent | 4d1c789d8949ffa2112c6beef4c23fc806e4bb1d (diff) | |
download | rack-3802c2ad5561872e72ca08809aeab5f067d2646f.tar.gz |
Add documentation for `HTTP_X_FORWARDED_*` constants.
-rw-r--r-- | lib/rack/request.rb | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/lib/rack/request.rb b/lib/rack/request.rb index 4fa1e496..f8e4ca21 100644 --- a/lib/rack/request.rb +++ b/lib/rack/request.rb @@ -129,11 +129,23 @@ module Rack # to include the port in a generated URI. DEFAULT_PORTS = { 'http' => 80, 'https' => 443, 'coffee' => 80 } + # The address of the client which connected to the proxy. + HTTP_X_FORWARDED_FOR = 'HTTP_X_FORWARDED_FOR' + + # The contents of the host/:authority header sent to the proxy. + HTTP_X_FORWARDED_HOST = 'HTTP_X_FORWARDED_HOST' + + # The value of the scheme sent to the proxy. HTTP_X_FORWARDED_SCHEME = 'HTTP_X_FORWARDED_SCHEME' - HTTP_X_FORWARDED_PROTO = 'HTTP_X_FORWARDED_PROTO' - HTTP_X_FORWARDED_HOST = 'HTTP_X_FORWARDED_HOST' - HTTP_X_FORWARDED_PORT = 'HTTP_X_FORWARDED_PORT' - HTTP_X_FORWARDED_SSL = 'HTTP_X_FORWARDED_SSL' + + # The protocol used to connect to the proxy. + HTTP_X_FORWARDED_PROTO = 'HTTP_X_FORWARDED_PROTO' + + # The port used to connect to the proxy. + HTTP_X_FORWARDED_PORT = 'HTTP_X_FORWARDED_PORT' + + # Another way for specifing https scheme was used. + HTTP_X_FORWARDED_SSL = 'HTTP_X_FORWARDED_SSL' def body; get_header(RACK_INPUT) end def script_name; get_header(SCRIPT_NAME).to_s end |