diff --git a/app/add.py b/app/add.py
index 4721066..18d8ba9 100644
--- a/app/add.py
+++ b/app/add.py
@@ -40,6 +40,7 @@ cert_path = config.get('haproxy', 'cert_path')
if form.getvalue('mode') is not None:
serv = form.getvalue('serv')
port = form.getvalue('port')
+ force_close = form.getvalue('force_close')
mode = " mode " + form.getvalue('mode')
ssl = ""
@@ -99,6 +100,20 @@ if form.getvalue('mode') is not None:
else:
options_split = ""
+ if force_close == "1":
+ options_split += " option http-server-close\n"
+ elif force_close == "2":
+ options_split += " option forceclose\n"
+ elif force_close == "3":
+ options_split += " option http-pretend-keepalive\n"
+
+ if form.getvalue('cookie'):
+ cookie = " cookie "+form.getvalue('cookie_name')
+ if form.getvalue('cookie_domain'):
+ cookie += " domain "+form.getvalue('cookie_domain')
+ cookie += " "+form.getvalue('rewrite')+" "+form.getvalue('nocache')+" "+form.getvalue('postonly')+"\n"
+ options_split += cookie
+
if form.getvalue('servers') is not None:
servers = form.getvalue('servers')
i = servers.split("\n")
@@ -128,7 +143,7 @@ if form.getvalue('mode') is not None:
funct.upload_and_restart(master[0], cfg)
funct.upload_and_restart(serv, cfg)
- print('' % (name, config_add))
+ print('' % (name, config_add))
print('')
diff --git a/app/templates/add.html b/app/templates/add.html
index 101fffc..8570969 100644
--- a/app/templates/add.html
+++ b/app/templates/add.html
@@ -32,7 +32,7 @@
IP and Port:
- :
+ :
IP for bind listner, if empty will be assignet on all IPs. Start typing ip, or press down. If you use VRRP keep in blank. If you assign an IP, the slave will not start
@@ -50,7 +50,7 @@
Enter name to pem file, or press down:
- or upload:
+
IP for bind listner, if empty will be assignet on all IPs. Start typing ip, or press down. If you use VRRP keep in blank. If you assign an IP, the slave will not start