Skip to content

Commit

Permalink
adding rspirep option for backend
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian Clark committed May 11, 2018
1 parent 4d1ca83 commit 0be6b4a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,9 @@ Set up (the latest version of) [HAProxy](http://www.haproxy.org/) in Ubuntu syst
* `haproxy_backend.{n}.option`: [optional]: Options to set (e.g. `[forwardfor]`)
* `haproxy_backend.{n}.no_option`: [optional]: Options to unset (e.g. `[redispatch]`)
* `haproxy_backend.{n}.http_check`: [optional]: Make HTTP health checks consider response contents or specific status codes (e.g. `expect status 403`)
* `haproxy_backend.{n}.rspirep`: [optional]: Response regexp edit definition
* `haproxy_backend.{n}.rspirep.{n}.string`: [required]: Regexp definition to be used on response (case insensitive)
* `haproxy_backend.{n}.rspirep.{n}.cond`: [optional]: A condition to apply this rule
* `haproxy_backend.{n}.stick`: [optional]: Stick declarations
* `haproxy_backend.{n}.stick.{n}.table`: [required]: Configure the stickiness table for the current section (e.g. `type ip size 500k`)
* `haproxy_backend.{n}.stick.{n}.stick_on`: [required]: Define a request pattern to associate a user to a server (e.g. `src`)
Expand Down
5 changes: 5 additions & 0 deletions templates/etc/haproxy/backend.cfg.j2
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ backend {{ backend.name }}
acl {{ acl.string }}
{% endfor %}

{% for rspirep in backend.rspirep | default([]) %}
rspirep {{ rspirep.string }}{% if rspirep.cond is defined %} {{ rspirep.cond }}{% endif %}

{% endfor %}

{% if backend.stats is defined %}
{% if backend.stats.enable is defined and backend.stats.enable | bool == true %}
stats enable
Expand Down

0 comments on commit 0be6b4a

Please sign in to comment.