updated haproxy state
This commit is contained in:
parent
6316419e75
commit
670fb3846f
@ -193,7 +193,7 @@ frontend fe_https from {{ haproxy.config.namespace }}
|
|||||||
{%- if haproxy.config.geoip.enabled %}
|
{%- if haproxy.config.geoip.enabled %}
|
||||||
# GeoIP
|
# GeoIP
|
||||||
http-request set-var(txn.country) lua.country(req.src)
|
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
|
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
|
http-response deny deny_status 451 content-type text/plain string "Denied" if !allowed_country !internal
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
Loading…
Reference in New Issue
Block a user