Add ProxyPreserveHost apache directive release_20150304
authorClinton Ebadi <clinton@unknownlamer.org>
Wed, 4 Mar 2015 06:38:47 +0000 (01:38 -0500)
committerClinton Ebadi <clinton@unknownlamer.org>
Wed, 4 Mar 2015 06:46:18 +0000 (01:46 -0500)
* Link other proxy directives to apache docs while I'm at it.

lib/proxy.dtl
src/plugins/apache.sml

index fe64f53..4886c38 100644 (file)
@@ -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 <tt>ProxyPass</tt> and <tt>ProxyPassReverse</tt>}}
+{{Interface to Apache <tt><a href="http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypass">ProxyPass</a></tt> and <tt><a href="http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypassreverse">ProxyPassReverse</a></tt>}}
+
+extern val proxyPreserveHost : bool -> [Vhost];
+{{Pass the Host header to the proxied server unmodified. <a href="http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypreservehost">Apache docs</a>.}}
\ No newline at end of file
index e160745..40db891 100644 (file)
@@ -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) =>