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