aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2010-01-21 10:38:19 -0500
committerScott Ullrich <sullrich@pfsense.org>2010-01-21 10:38:19 -0500
commitd139a297c69528d10290ca9dfee841674e0c9546 (patch)
tree4b5f596ae3bab16d6ec67cf7c4f8d5399b84bfee
parenta2989321e97e9199e238d2670ff1c83ce8f229b5 (diff)
downloadpfsense-packages-d139a297c69528d10290ca9dfee841674e0c9546.tar.gz
pfsense-packages-d139a297c69528d10290ca9dfee841674e0c9546.tar.bz2
pfsense-packages-d139a297c69528d10290ca9dfee841674e0c9546.zip
Correctly enable/disable httpclose and forwardfor options
-rw-r--r--config/haproxy/haproxy.inc8
1 files changed, 6 insertions, 2 deletions
diff --git a/config/haproxy/haproxy.inc b/config/haproxy/haproxy.inc
index 8d477b64..034e3f9d 100644
--- a/config/haproxy/haproxy.inc
+++ b/config/haproxy/haproxy.inc
@@ -169,8 +169,12 @@ function haproxy_configure() {
fwrite ($fd, "\tmode\t\t\t" . $backend_type . "\n");
fwrite ($fd, "\tlog\t\t\tglobal\n");
fwrite ($fd, "\toption\t\t\tdontlognull\n");
- fwrite ($fd, "\toption\t\t\thttpclose\n");
- fwrite ($fd, "\toption\t\t\tforwardfor\n");
+
+ if($backend['httpclose'])
+ fwrite ($fd, "\toption\t\t\thttpclose\n");
+
+ if($backend['forwardfor'])
+ fwrite ($fd, "\toption\t\t\tforwardfor\n");
if($backend['max_connections'])
fwrite ($fd, "\tmaxconn\t\t\t" . $backend['max_connections'] . "\n");