aboutsummaryrefslogtreecommitdiffstats
path: root/config/haproxy-devel/pkg
diff options
context:
space:
mode:
authorPiBa-NL <pba_2k3@yahoo.com>2015-12-12 21:42:34 +0100
committerPiBa-NL <pba_2k3@yahoo.com>2015-12-12 21:42:34 +0100
commit1980fb6674d51d73f5ed6aa6e48dc2133d373a36 (patch)
tree131385b855237777e9d403ad34686433bac9a371 /config/haproxy-devel/pkg
parentdcc68137b44ee8f82f4e71f6650fc1cec5fd8c6b (diff)
downloadpfsense-packages-1980fb6674d51d73f5ed6aa6e48dc2133d373a36.tar.gz
pfsense-packages-1980fb6674d51d73f5ed6aa6e48dc2133d373a36.tar.bz2
pfsense-packages-1980fb6674d51d73f5ed6aa6e48dc2133d373a36.zip
haproxy-devel, small fixes
Diffstat (limited to 'config/haproxy-devel/pkg')
-rw-r--r--config/haproxy-devel/pkg/haproxy.inc9
-rw-r--r--config/haproxy-devel/pkg/haproxy_socketinfo.inc6
2 files changed, 11 insertions, 4 deletions
diff --git a/config/haproxy-devel/pkg/haproxy.inc b/config/haproxy-devel/pkg/haproxy.inc
index 3d614fe0..8dce42ee 100644
--- a/config/haproxy-devel/pkg/haproxy.inc
+++ b/config/haproxy-devel/pkg/haproxy.inc
@@ -43,7 +43,10 @@ $a_frontendmode = array();
$a_frontendmode['http'] = array('name' => "http / https(offloading)", 'shortname' => "http/https");
$a_frontendmode['https'] = array('name' => "ssl / https(TCP mode)", 'shortname' => "ssl/https");
$a_frontendmode['tcp'] = array('name' => "tcp", 'shortname' => "tcp");
-$a_frontendmode['health'] = array('name' => "health", 'shortname' => "health");
+/*
+ if anyone actually used this what was it good for with recent package versions?
+$a_frontendmode['health'] = array('name' => "health", 'shortname' => "health");
+*/
global $a_acltypes;
$a_acltypes = array();
@@ -1738,8 +1741,8 @@ function haproxy_writeconf($configpath) {
if ($bind['forwardfor']) {
fwrite ($fd, "\toption\t\t\tforwardfor\n");
fwrite ($fd, "\tacl https ssl_fc\n");
- fwrite ($fd, "\treqadd X-Forwarded-Proto:\ http if !https\n");
- fwrite ($fd, "\treqadd X-Forwarded-Proto:\ https if https\n");
+ fwrite ($fd, "\thttp-request set-header\t\tX-Forwarded-Proto http if !https\n");
+ fwrite ($fd, "\thttp-request set-header\t\tX-Forwarded-Proto https if https\n");
}
}
diff --git a/config/haproxy-devel/pkg/haproxy_socketinfo.inc b/config/haproxy-devel/pkg/haproxy_socketinfo.inc
index cbfb131b..7dbb6221 100644
--- a/config/haproxy-devel/pkg/haproxy_socketinfo.inc
+++ b/config/haproxy-devel/pkg/haproxy_socketinfo.inc
@@ -40,14 +40,18 @@ $show_clients_traffic = "YES";
function haproxy_socket_command($command){
$result = array();
if (file_exists("/tmp/haproxy.socket")) {
- $socket = stream_socket_client('unix:///tmp/haproxy.socket', $errno, $errstr);
+ $socket = @stream_socket_client('unix:///tmp/haproxy.socket', $errno, $errstr);
if ($socket) {
fwrite($socket, "$command\n");
while (!feof($socket)) {
$result[] = fgets($socket);
}
fclose($socket);
+ } else {
+ echo "cannot open command socket, haproxy not running? ({$errstr})";
}
+ } else {
+ echo "haproxy command socket does not exist, haproxy not running?";
}
return $result;
}