Skip to content

Commit abd0703

Browse files
committed
feat(config): support httpresponses in backend
... and also switch httprequests to the shorter macro based rendering variant whilst at it. Signed-off-by: Georg Pfuetzenreuter <georg.pfuetzenreuter@suse.com>
1 parent 2550aed commit abd0703

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

haproxy/templates/haproxy.jinja

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -544,13 +544,10 @@ backend {{ backend.get('name', backend_name) }}
544544
{%- endif %}
545545
{%- endif %}
546546
{%- if 'httprequests' in backend %}
547-
{%- if backend.httprequests is string %}
548-
http-request {{ backend.httprequests }}
549-
{%- else %}
550-
{%- for httprequest in backend.httprequests %}
551-
http-request {{ httprequest }}
552-
{%- endfor %}
553-
{%- endif %}
547+
{{- render_list_of_dictionaries('http-request', backend.httprequests) }}
548+
{%- endif %}
549+
{%- if 'httpresponses' in backend %}
550+
{{- render_list_of_dictionaries('http-response', backend.httpresponses) }}
554551
{%- endif %}
555552
{%- if 'httpchecks' in backend %}
556553
{%- if backend.httpchecks is string %}

0 commit comments

Comments
 (0)