diff --git a/states/haproxy/templates/haproxy.cfg.j2 b/states/haproxy/templates/haproxy.cfg.j2 index 17ada5e..c38cfdf 100644 --- a/states/haproxy/templates/haproxy.cfg.j2 +++ b/states/haproxy/templates/haproxy.cfg.j2 @@ -144,10 +144,6 @@ cache static max-object-size {{ (haproxy.config.cache.size|default(8))*1024*1024 }} max-age {{ haproxy.config.cache.age|default(3600) }} -# Per IP rates stick table -backend per_ip_rates from {{ haproxy.config.namespace }} - stick-table type string size {{ haproxy.config.ddos.size|default("1m") }} expire {{ haproxy.config.ddos.timeperiod|default("10s") }} store http_req_rate({{ haproxy.config.ddos.timeperiod|default("10s")}}) {{ "peers paulbsd" if haproxy.config.peers.hosts }} - # Default HTTP frontend frontend fe_http from {{ haproxy.config.namespace }} bind *:{{ haproxy.config.http_port }},:::{{ haproxy.config.http_port }} v4v6 name http @@ -345,3 +341,7 @@ backend {{ name }} from {{ haproxy.config.namespace }} {%- if haproxy.config.admin %} {{ admin() if haproxy.config.admin }} {%- endif %} + +# Per IP rates stick table +backend per_ip_rates from {{ haproxy.config.namespace }} + stick-table type string size {{ haproxy.config.ddos.size|default("1m") }} expire {{ haproxy.config.ddos.timeperiod|default("10s") }} store http_req_rate({{ haproxy.config.ddos.timeperiod|default("10s")}}) {{ "peers paulbsd" if haproxy.config.peers.hosts }}