updated haproxy state

This commit is contained in:
Paul 2023-08-26 09:48:17 +02:00
parent 6316419e75
commit 670fb3846f

View File

@ -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 "<html><body><p>country: %[lua.country(req.src)]</p><p>city: %[lua.city(req.src)]<p></body></html>" if self_host path_location
http-request return status 200 content-type "text/html; charset=utf-8" lf-string "<html><body><p>ip: %[var(req.src)]</p><p>country: %[lua.country(req.src)]</p><p>city: %[lua.city(req.src)]<p></body></html>" 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 %}