Skip to content

Commit

Permalink
Merge pull request devops-coop#26 from metaevolution/http-request
Browse files Browse the repository at this point in the history
Added support for http-request to frontend and backend config
  • Loading branch information
PierrePaul committed Mar 28, 2015
2 parents 3f82cd4 + ad1f29a commit e13296b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions templates/backend.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ backend {{ item.name }}
http-check except {{ check_except }}
{% endfor %}
{% endif -%}
{% if item.http_request is defined %}
{% include "http_request.cfg" %}
{% endif -%}
{% if item.options is defined %}
{% for option in item.options %}
option {{ option }}
Expand Down
4 changes: 4 additions & 0 deletions templates/frontend.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ frontend {{ item.name }} {%if item.ip is defined %}{{ item.ip }}{% endif %}{%if
{% endfor -%}
{% endif -%}

{% if item.http_request is defined %}
{% include "http_request.cfg" %}
{% endif -%}

{%- if item.default_backend is defined -%}
default_backend {{ item.default_backend }}
{% endif -%}
Expand Down
4 changes: 4 additions & 0 deletions templates/http_request.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{%- for request in item.http_request -%}
http-request {{ request.action }}{% if request.param is defined %} {{ request.param }}{% endif %}{% if request.condition is defined %} {{ request.condition }}{% endif %}

{% endfor -%}

0 comments on commit e13296b

Please sign in to comment.