Disable country blocks

This commit is contained in:
Felix Ableitner 2022-08-03 20:58:45 +02:00
parent 946d6c3ce5
commit 99027a6b96
2 changed files with 17 additions and 17 deletions

View file

@ -1,12 +1,12 @@
limit_req_zone $binary_remote_addr zone=gitea_ratelimit:10m rate=1r/s;
geoip_country /usr/share/GeoIP/GeoIP.dat;
map $geoip_country_code $allowed_country {
default yes;
CN no;
RU no;
IN no;
}
#geoip_country /usr/share/GeoIP/GeoIP.dat;
#map $geoip_country_code $allowed_country {
# default yes;
# CN no;
# RU no;
# IN no;
#}
server {
listen 80;
@ -53,9 +53,9 @@ server {
gzip_proxied any;
gzip_vary on;
if ($allowed_country = no) {
return 444;
}
#if ($allowed_country = no) {
# return 444;
#}
location / {
limit_req zone=gitea_ratelimit burst=30 nodelay;

View file

@ -1,7 +1,7 @@
map $geoip_country_code $allowed_country {
default yes;
CN no;
}
#map $geoip_country_code $allowed_country {
# default yes;
# CN no;
#}
server {
listen 80;
@ -48,9 +48,9 @@ server {
gzip_proxied any;
gzip_vary on;
if ($allowed_country = no) {
return 444;
}
#if ($allowed_country = no) {
# return 444;
#}
location / {
limit_req zone=gitea_ratelimit burst=30 nodelay;