aboutsummaryrefslogtreecommitdiffstats
path: root/config/haproxy
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2009-10-13 23:12:21 -0400
committerScott Ullrich <sullrich@pfsense.org>2009-10-13 23:12:21 -0400
commit9732ead314536dc0324717ac05b24f807812ec44 (patch)
treea96f369142931e97621f04aca5b8aec1b60c040e /config/haproxy
parentb017390b6bda647e0d78256d4058a3de01060cdf (diff)
downloadpfsense-packages-9732ead314536dc0324717ac05b24f807812ec44.tar.gz
pfsense-packages-9732ead314536dc0324717ac05b24f807812ec44.tar.bz2
pfsense-packages-9732ead314536dc0324717ac05b24f807812ec44.zip
Cookie is optional
Diffstat (limited to 'config/haproxy')
-rw-r--r--config/haproxy/haproxy.inc9
1 files changed, 7 insertions, 2 deletions
diff --git a/config/haproxy/haproxy.inc b/config/haproxy/haproxy.inc
index bb5886ff..e42f7460 100644
--- a/config/haproxy/haproxy.inc
+++ b/config/haproxy/haproxy.inc
@@ -178,8 +178,13 @@ function haproxy_configure() {
if(is_array($a_servers)) {
foreach ($a_servers as $server) {
if($server['backend']==$backend['name']) {
- if($server['status']=='active')
- fwrite ($fd, "\tserver\t\t\t".$server['name']." ".$server['address'].":".$server['port']." cookie ".$server['cookie']." check inter 1000 weight ".$server['weight']."\n");
+ if($server['status']=='active') {
+ if($server['cookie'])
+ $cookie = " cookie {$server['cookie']} ";
+ else
+ $cookie = "";
+ fwrite ($fd, "\tserver\t\t\t".$server['name']." ".$server['address'].":".$server['port']." $cookie "." check inter 1000 weight ".$server['weight']."\n");
+ }
}
}
}