diff options
author | Windom WU <drw_08@hotmail.com> | 2024-04-23 14:39:02 +0800 |
---|---|---|
committer | Windom WU <drw_08@hotmail.com> | 2024-04-23 14:39:02 +0800 |
commit | 984c386d11ead8371b7ac381e6c0921473e557ed (patch) | |
tree | 62401ea0459f9009b88b44202f3fc42ac402228a /data/templates/load-balancing | |
parent | b5d3d36d1f70e53ef6a8a6634ab863d94d791bf2 (diff) | |
download | vyos-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.j2 | 12 |
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() %} |