net/haproxy: fix invalid use of option forwardfor

This resolves another infamous warning during config test:
'option forwardfor' ignored for frontend as it requires HTTP mode
This commit is contained in:
Frank Wall 2020-04-14 23:58:41 +02:00
parent cf179b19ad
commit ceb08f9334

View file

@ -1087,7 +1087,7 @@ frontend {{frontend.name}}
http-request replace-header Cookie '^(.*?; )?({{backend_data.persistence_cookiename}}=)"([^;"]*)"(;.*)?$' \1\2\3\4
{% endif %}
{% endif %}
{% if frontend.forwardFor == '1' %}
{% if frontend.forwardFor == '1' and frontend.mode == 'http' %}
option forwardfor
{% endif %}
# tuning options