aboutsummaryrefslogtreecommitdiffstats
path: root/config/haproxy-devel/www
diff options
context:
space:
mode:
authorPiBa-NL <pba_2k3@yahoo.com>2015-02-02 01:11:17 +0100
committerPiBa-NL <pba_2k3@yahoo.com>2015-02-02 01:11:17 +0100
commite28f3357fa41438060791f4b339ab079721d64d6 (patch)
tree395f0249f2bb4922789d133783421174b6fc8f51 /config/haproxy-devel/www
parent90e3a2b3636b8bda325ed66663bba6a6f126762b (diff)
downloadpfsense-packages-e28f3357fa41438060791f4b339ab079721d64d6.tar.gz
pfsense-packages-e28f3357fa41438060791f4b339ab079721d64d6.tar.bz2
pfsense-packages-e28f3357fa41438060791f4b339ab079721d64d6.zip
haproxy-devel, several improvements / fixes:
-combine certificate acl's with user acl's -wildcard certificate acl handling -better handeling of 'transparent' backends when using mixed ipv4 and ipv6, a single defined backend can write 2 backends to the config ipv4 / ipv6 -option to negate a acl -moved acl definitions above advanced user config in cfg (to allow user config to use already defined acls) -toggle in frontend overview to easily enable/disable a frontend
Diffstat (limited to 'config/haproxy-devel/www')
-rw-r--r--config/haproxy-devel/www/javascript/haproxy_geturl.js43
1 files changed, 43 insertions, 0 deletions
diff --git a/config/haproxy-devel/www/javascript/haproxy_geturl.js b/config/haproxy-devel/www/javascript/haproxy_geturl.js
new file mode 100644
index 00000000..5df80646
--- /dev/null
+++ b/config/haproxy-devel/www/javascript/haproxy_geturl.js
@@ -0,0 +1,43 @@
+/**
+ * getURL is a proprietary Adobe function, but it's simplicity has made it very
+ * popular. If getURL is undefined we spin our own by wrapping XMLHttpRequest.
+ */
+if (typeof getURL == 'undefined') {
+ getURL = function(url, callback) {
+ if (!url)
+ throw 'No URL for getURL';
+
+ try {
+ if (typeof callback.operationComplete == 'function')
+ callback = callback.operationComplete;
+ } catch (e) {}
+ if (typeof callback != 'function')
+ throw 'No callback function for getURL "' + url + '"';
+
+ var http_request = null;
+ if (typeof XMLHttpRequest != 'undefined') {
+ http_request = new XMLHttpRequest();
+ }
+ else if (typeof ActiveXObject != 'undefined') {
+ try {
+ http_request = new ActiveXObject('Msxml2.XMLHTTP');
+ } catch (e) {
+ try {
+ http_request = new ActiveXObject('Microsoft.XMLHTTP');
+ } catch (e) {}
+ }
+ }
+ if (!http_request)
+ throw '<?=gettext("Both getURL and XMLHttpRequest are undefined"); ?>';
+
+ http_request.onreadystatechange = function() {
+ if (http_request.readyState == 4) {
+ callback( { success : true,
+ content : http_request.responseText,
+ contentType : http_request.getResponseHeader("Content-Type") } );
+ }
+ }
+ http_request.open('GET', url, true);
+ http_request.send(null);
+ }
+}