From 93d62353eb37d79eee9e89dcd8c3ede2bf748bbd Mon Sep 17 00:00:00 2001 From: Clinton Ebadi Date: Wed, 4 Mar 2015 01:38:47 -0500 Subject: [PATCH] Add ProxyPreserveHost apache directive * Link other proxy directives to apache docs while I'm at it. --- lib/proxy.dtl | 5 ++++- src/plugins/apache.sml | 7 +++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/proxy.dtl b/lib/proxy.dtl index fe64f53..4886c38 100644 --- a/lib/proxy.dtl +++ b/lib/proxy.dtl @@ -11,4 +11,7 @@ extern type proxy_reverse_target; extern val proxyPass : no_spaces -> proxy_target -> [Vhost]; extern val proxyPassReverse : no_spaces -> proxy_reverse_target -> [Vhost]; -{{Interface to Apache ProxyPass and ProxyPassReverse}} +{{Interface to Apache ProxyPass and ProxyPassReverse}} + +extern val proxyPreserveHost : bool -> [Vhost]; +{{Pass the Host header to the proxied server unmodified. Apache docs.}} \ No newline at end of file diff --git a/src/plugins/apache.sml b/src/plugins/apache.sml index e160745..40db891 100644 --- a/src/plugins/apache.sml +++ b/src/plugins/apache.sml @@ -693,6 +693,13 @@ val () = Env.action_two "proxyPassReverse" write to; write "\n")) +val () = Env.action_one "proxyPreserveHost" + ("enable", Env.bool) + (fn (enable) => + (write "\tProxyPreserveHost\t"; + if enable then write "On" else write "Off"; + write "\n")) + val () = Env.action_three "rewriteRule" ("from", Env.string, "to", Env.string, "flags", Env.list flag) (fn (from, to, flags) => -- 2.20.1