Update states/haproxy/templates/haproxy.cfg.j2
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Paul 2024-03-15 13:37:23 +01:00
parent 2dd556391f
commit edcdada678

View File

@ -144,10 +144,6 @@ cache static
max-object-size {{ (haproxy.config.cache.size|default(8))*1024*1024 }} max-object-size {{ (haproxy.config.cache.size|default(8))*1024*1024 }}
max-age {{ haproxy.config.cache.age|default(3600) }} 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 # Default HTTP frontend
frontend fe_http from {{ haproxy.config.namespace }} frontend fe_http from {{ haproxy.config.namespace }}
bind *:{{ haproxy.config.http_port }},:::{{ haproxy.config.http_port }} v4v6 name http 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 %} {%- if haproxy.config.admin %}
{{ admin() if haproxy.config.admin }} {{ admin() if haproxy.config.admin }}
{%- endif %} {%- 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 }}