From 670fb3846faa6b8e2ea6acfae116085f5a68469d Mon Sep 17 00:00:00 2001 From: Paul Lecuq Date: Sat, 26 Aug 2023 09:48:17 +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 d38d37b..93ccfb8 100644 --- a/states/haproxy/templates/haproxy.cfg.j2 +++ b/states/haproxy/templates/haproxy.cfg.j2 @@ -193,7 +193,7 @@ frontend fe_https from {{ haproxy.config.namespace }} {%- if haproxy.config.geoip.enabled %} # 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 "

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 {%- endif %}