From 280f4f96ee9d5c6f6ba182f1377edaa4c7e4b3f7 Mon Sep 17 00:00:00 2001 From: Paul Lecuq Date: Thu, 22 Aug 2024 04:20:42 +0200 Subject: [PATCH] updated haproxy state --- states/haproxy/templates/haproxy.cfg.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/states/haproxy/templates/haproxy.cfg.j2 b/states/haproxy/templates/haproxy.cfg.j2 index 70bca26..de8371d 100644 --- a/states/haproxy/templates/haproxy.cfg.j2 +++ b/states/haproxy/templates/haproxy.cfg.j2 @@ -82,7 +82,7 @@ backend admin from {{ haproxy.config.namespace }} {%- macro geoip() %} http-request set-var(txn.country) lua.country(req.src) - http-request return status 200 content-type "text/html; charset=utf-8" lf-string "

ip: %[var(req.src)]

country: %[lua.country(req.src)]

city: %[lua.city(req.src)]

" if self_host path_location + http-request return status 200 content-type "text/html; charset=utf-8" lf-string "ip: %[var(req.src)]
country: %[lua.country(req.src)]
city: %[lua.city(req.src)]" if self_host path_location acl allowed_country var(txn.country),map_str(/etc/haproxy/maps/countries,OK) OK http-response deny deny_status 451 content-type text/plain string "Denied" if !allowed_country !internal {%- endmacro %}