Skip to content

Commit

Permalink
Merge pull request #93 from asosso/master
Browse files Browse the repository at this point in the history
a 'tcp-request' rule placed after an 'http-request' rule will still b…
  • Loading branch information
tersmitten authored Sep 12, 2019
2 parents 662b936 + c622c58 commit 0549ba9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
20 changes: 10 additions & 10 deletions templates/etc/haproxy/frontend.cfg.j2
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,6 @@ frontend {{ frontend.name }}
capture {{ capture.type }} {{ capture.name }} len {{ capture.length }}
{% endfor %}

{% for http_request in frontend.http_request | default([]) %}
http-request {{ http_request.action }}{% if http_request.param is defined %} {{ http_request.param }}{% endif %}{% if http_request.cond is defined %} {{ http_request.cond }}{% endif %}

{% endfor %}

{% for http_response in frontend.http_response | default([]) %}
http-response {{ http_response.action }}{% if http_response.param is defined %} {{ http_response.param }}{% endif %}{% if http_response.cond is defined %} {{ http_response.cond }}{% endif %}

{% endfor %}

{% for tcp_request_inspect_delay in frontend.tcp_request_inspect_delay | default([]) %}
tcp-request inspect-delay {{ tcp_request_inspect_delay.timeout }}

Expand All @@ -81,6 +71,16 @@ frontend {{ frontend.name }}

{% endfor %}

{% for http_request in frontend.http_request | default([]) %}
http-request {{ http_request.action }}{% if http_request.param is defined %} {{ http_request.param }}{% endif %}{% if http_request.cond is defined %} {{ http_request.cond }}{% endif %}

{% endfor %}

{% for http_response in frontend.http_response | default([]) %}
http-response {{ http_response.action }}{% if http_response.param is defined %} {{ http_response.param }}{% endif %}{% if http_response.cond is defined %} {{ http_response.cond }}{% endif %}

{% endfor %}

{% for action in ['reqadd', 'rspadd'] %}
{% for params in frontend[action] | default([]) %}
{{ action }} {{ params.string }}{% if params.cond is defined %} {{ params.cond }}{% endif %}
Expand Down
10 changes: 5 additions & 5 deletions templates/etc/haproxy/listen.cfg.j2
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,6 @@ listen {{ listen.name }}
{% endif %}
{% endif %}

{% for http_request in listen.http_request | default([]) %}
http-request {{ http_request.action }}{% if http_request.param is defined %} {{ http_request.param }}{% endif %}{% if http_request.cond is defined %} {{ http_request.cond }}{% endif %}

{% endfor %}

{% for tcp_request_inspect_delay in listen.tcp_request_inspect_delay | default([]) %}
tcp-request inspect-delay {{ tcp_request_inspect_delay.timeout }}

Expand All @@ -109,6 +104,11 @@ listen {{ listen.name }}

{% endfor %}

{% for http_request in listen.http_request | default([]) %}
http-request {{ http_request.action }}{% if http_request.param is defined %} {{ http_request.param }}{% endif %}{% if http_request.cond is defined %} {{ http_request.cond }}{% endif %}

{% endfor %}

{% for http_response in listen.http_response | default([]) %}
http-response {{ http_response.action }}{% if http_response.param is defined %} {{ http_response.param }}{% endif %}{% if http_response.cond is defined %} {{ http_response.cond }}{% endif %}

Expand Down

0 comments on commit 0549ba9

Please sign in to comment.