From 115a263e1af3afc19d094639ccd45c01291976e2 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Thu, 19 Feb 2026 18:03:28 +0100 Subject: [PATCH] Expand the directives that can be added to a haproxy backend. --- templates/haproxy.cfg.j2 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/templates/haproxy.cfg.j2 b/templates/haproxy.cfg.j2 index 21445fd..5aa6d96 100644 --- a/templates/haproxy.cfg.j2 +++ b/templates/haproxy.cfg.j2 @@ -292,11 +292,17 @@ backend {{ srv.acl_name }}_bck {% else %} mode http option httpchk - {% if srv.enable_websocket is defined and srv.enable_websocket %} +{% if srv.enable_websocket is defined and srv.enable_websocket %} option http-server-close timeout tunnel {{ haproxy_tunnel_timeout | default('1h') }} - {% endif %} +{% endif %} balance {{ srv.balance_type | default('roundrobin') }} +{% if srv.backend_additional_options is defined %} +{% for bck_opt in srv.backend_additional_options %} + {{ bck_opt }} +{% endfor %} + +{% endif %} {% if srv.http_check_enabled is defined and srv.http_check_enabled %} http-check send {{ srv.http_check }} http-check expect {{ srv.http_check_expect }}