aboutsummaryrefslogtreecommitdiffstats
path: root/config/haproxy
diff options
context:
space:
mode:
Diffstat (limited to 'config/haproxy')
-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");