summaryrefslogtreecommitdiff
path: root/data/templates/load-balancing
diff options
context:
space:
mode:
authorAlex W <embezzle.dev@proton.me>2024-04-15 18:23:05 +0100
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2024-04-16 15:08:11 +0000
commitdeb92e4661106283d7951570fc9ab243e74bccd9 (patch)
tree9e75b43672d9852c30064f5ea4f0a19784bcb201 /data/templates/load-balancing
parentd8bca084a1f050a52bef46f5e1b589cbf89ce54d (diff)
downloadvyos-1x-deb92e4661106283d7951570fc9ab243e74bccd9.tar.gz
vyos-1x-deb92e4661106283d7951570fc9ab243e74bccd9.zip
T6242: load-balancing reverse-proxy: Ability for ssl backends to not verify server certificates
(cherry picked from commit aafe22d08bb38a579dd5075fd27a1b88beeca791)
Diffstat (limited to 'data/templates/load-balancing')
-rw-r--r--data/templates/load-balancing/haproxy.cfg.j22
1 files changed, 1 insertions, 1 deletions
diff --git a/data/templates/load-balancing/haproxy.cfg.j2 b/data/templates/load-balancing/haproxy.cfg.j2
index 849cef74d..feb10d247 100644
--- a/data/templates/load-balancing/haproxy.cfg.j2
+++ b/data/templates/load-balancing/haproxy.cfg.j2
@@ -150,7 +150,7 @@ backend {{ back }}
{% endfor %}
{% endif %}
{% if back_config.server is vyos_defined %}
-{% set ssl_back = 'ssl ca-file /run/haproxy/' ~ back_config.ssl.ca_certificate ~ '.pem' if back_config.ssl.ca_certificate is vyos_defined else '' %}
+{% set ssl_back = 'ssl ca-file /run/haproxy/' ~ back_config.ssl.ca_certificate ~ '.pem' if back_config.ssl.ca_certificate is vyos_defined else ('ssl verify none' if back_config.ssl.no_verify is vyos_defined else '') %}
{% for server, server_config in back_config.server.items() %}
server {{ server }} {{ server_config.address }}:{{ server_config.port }}{{ ' check' if server_config.check is vyos_defined }}{{ ' backup' if server_config.backup is vyos_defined }}{{ ' send-proxy' if server_config.send_proxy is vyos_defined }}{{ ' send-proxy-v2' if server_config.send_proxy_v2 is vyos_defined }} {{ ssl_back }}
{% endfor %}