From 359d46434b6b4cefde0b8894c5847f1b7f39235b Mon Sep 17 00:00:00 2001 From: John Bachir Date: Mon, 10 Apr 2017 15:31:51 -0400 Subject: [PATCH] fix and improve documentation for preserve_host --- README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0e0394e..95e7a1a 100644 --- a/README.md +++ b/README.md @@ -78,9 +78,20 @@ Right now if more than one rule matches any given route, it throws an exception ### Options +#### Terminology + +
+
Source Request
+
The request sent from the end user's browser to the rack stack which is running rack-reverse-proxy.
+
Target Request
+
The request sent from rack-reverse-proxy to the server which will produce the response.
+
+ `reverse_proxy_options` sets global options for all reverse proxies. Available options are: -* `:preserve_host` Set to false to omit Host headers +* `:preserve_host` This determines which Host header is used in the target request. If set to `true`, the target + request's host (specified in the `reverse_proxy` invocation) will be used. If set to `false`, the source request's + Host header will be re-used for the target request. Default: `true`. * `:username` username for basic auth * `:password` password for basic auth * `:matching` is a global only option, if set to :first the first matched url will be requested (no ambigous error). Default: :all.