country whitelist/blacklist

This commit is contained in:
bunkerity
2020-11-18 11:21:25 +01:00
parent 0635eb368b
commit fe1d724c9f
6 changed files with 21 additions and 14 deletions

View File

@@ -5,6 +5,6 @@ geoip2 /etc/nginx/geoip.mmdb {
}
map $geoip2_data_country_code $allowed_country {
default yes;
%BLOCK_COUNTRY%
default %DEFAULT%;
%COUNTRY%
}

View File

@@ -84,8 +84,8 @@ http {
# shared memory zone for limit_req
%LIMIT_REQ_ZONE%
# list of blocked country
%BLOCK_COUNTRY%
# whitelist or blacklist country
%USE_COUNTRY%
# list of blocked user agents
%BLOCK_USER_AGENT%