Skip to content

Commit

Permalink
fix(templates/haproxy.jinja): replace deprecated reqadd
Browse files Browse the repository at this point in the history
  • Loading branch information
myii committed Feb 21, 2021
1 parent 958c2d9 commit 8c6c855
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions haproxy/templates/haproxy.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -282,10 +282,10 @@ listen {{ listener.get('name', listener_name) }}
{%- endif %}
{%- if 'reqadds' in listener %}
{%- if listener.reqadds is string %}
reqadd {{ listener.reqadds }}
http-request add-header {{ listener.reqadds }}
{%- else %}
{%- for reqadd in listener.reqadds %}
reqadd {{ reqadd }}
http-request add-header {{ reqadd }}
{%- endfor %}
{%- endif %}
{%- endif %}
Expand Down Expand Up @@ -450,7 +450,7 @@ frontend {{ frontend.get('name', frontend_name) }}
{{- render_list_of_dictionaries('reqrep', frontend.reqreps) }}
{%- endif %}
{%- if 'reqadds' in frontend %}
{{- render_list_of_dictionaries('reqadd', frontend.reqadds) }}
{{- render_list_of_dictionaries('http-request add-header', frontend.reqadds) }}
{%- endif %}
{%- if 'redirects' in frontend %}
{{- render_list_of_dictionaries('redirect', frontend.redirects) }}
Expand Down

0 comments on commit 8c6c855

Please sign in to comment.