aboutsummaryrefslogtreecommitdiffstats
path: root/config/haproxy-dev/haproxy.inc
diff options
context:
space:
mode:
authorthompsa <andy@fud.org.nz>2010-02-10 08:54:10 +1300
committerthompsa <andy@fud.org.nz>2010-02-10 08:54:10 +1300
commitb86d87cd032411165f9a197b00c6f5c8baef8f75 (patch)
treedf31927dcdd7c07a94937eed9dd3efa402274030 /config/haproxy-dev/haproxy.inc
parentc41399737ada9c52a25161dc35df3a66e3f32eb1 (diff)
downloadpfsense-packages-b86d87cd032411165f9a197b00c6f5c8baef8f75.tar.gz
pfsense-packages-b86d87cd032411165f9a197b00c6f5c8baef8f75.tar.bz2
pfsense-packages-b86d87cd032411165f9a197b00c6f5c8baef8f75.zip
'cookie' can not be specified in non-http mode.
Diffstat (limited to 'config/haproxy-dev/haproxy.inc')
-rw-r--r--config/haproxy-dev/haproxy.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/config/haproxy-dev/haproxy.inc b/config/haproxy-dev/haproxy.inc
index 48ceacaf..97e33609 100644
--- a/config/haproxy-dev/haproxy.inc
+++ b/config/haproxy-dev/haproxy.inc
@@ -248,7 +248,7 @@ function haproxy_configure() {
if ($backend['pool'] == $pool['name'] && is_array($pool['ha_servers']['item'])) {
if($pool['status'] != 'active')
continue;
- if($pool['cookie_name'])
+ if($pool['cookie_name'] && strtolower($backend['type']) == "http")
fwrite ($fd, "\tcookie\t\t\t" . $pool['cookie_name'] . " insert indirect\n");
$uri = $pool['monitor_uri'];
@@ -258,7 +258,7 @@ function haproxy_configure() {
$uri = "/";
fwrite ($fd, "\toption\t\t\t{$httpchk} HEAD " . $uri . " HTTP/1.0\n");
- if($pool['cookie'])
+ if($pool['cookie'] && strtolower($backend['type']) == "http")
$cookie = " cookie {$pool['cookie']} ";
else
$cookie = "";