summaryrefslogtreecommitdiff
path: root/data/templates/load-balancing
diff options
context:
space:
mode:
authorWindom WU <drw_08@hotmail.com>2024-04-23 14:39:02 +0800
committerWindom WU <drw_08@hotmail.com>2024-04-23 14:39:02 +0800
commit984c386d11ead8371b7ac381e6c0921473e557ed (patch)
tree62401ea0459f9009b88b44202f3fc42ac402228a /data/templates/load-balancing
parentb5d3d36d1f70e53ef6a8a6634ab863d94d791bf2 (diff)
downloadvyos-1x-984c386d11ead8371b7ac381e6c0921473e557ed.tar.gz
vyos-1x-984c386d11ead8371b7ac381e6c0921473e557ed.zip
T6226: add HAPROXY tcp-request related block to load-balancing reverse proxy config
Diffstat (limited to 'data/templates/load-balancing')
-rw-r--r--data/templates/load-balancing/haproxy.cfg.j212
1 files changed, 12 insertions, 0 deletions
diff --git a/data/templates/load-balancing/haproxy.cfg.j2 b/data/templates/load-balancing/haproxy.cfg.j2
index dd93afba5..e8622ba7b 100644
--- a/data/templates/load-balancing/haproxy.cfg.j2
+++ b/data/templates/load-balancing/haproxy.cfg.j2
@@ -69,6 +69,18 @@ frontend {{ front }}
{% endif %}
{% if front_config.mode is vyos_defined %}
mode {{ front_config.mode }}
+{% if front_config.tcp_request.inspect_delay is vyos_defined %}
+ tcp-request inspect-delay {{ front_config.tcp_request.inspect_delay }}
+{% endif %}
+{# add tcp-request related directive if ssl is configed #}
+{% if front_config.mode is vyos_defined('tcp') and front_config.rule is vyos_defined %}
+{% for rule, rule_config in front_config.rule.items() %}
+{% if rule_config.ssl is vyos_defined %}
+ tcp-request content accept if { req_ssl_hello_type 1 }
+{% break %}
+{% endif %}
+{% endfor %}
+{% endif %}
{% endif %}
{% if front_config.rule is vyos_defined %}
{% for rule, rule_config in front_config.rule.items() %}