From 99027a6b960ff389cdd6aa8a7b0f8a4f467a5bf2 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Wed, 3 Aug 2022 20:58:45 +0200 Subject: [PATCH] Disable country blocks --- templates/gitea.conf | 20 ++++++++++---------- templates/weblate.conf | 14 +++++++------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/templates/gitea.conf b/templates/gitea.conf index f8a82da..3a8157a 100644 --- a/templates/gitea.conf +++ b/templates/gitea.conf @@ -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; diff --git a/templates/weblate.conf b/templates/weblate.conf index 3a8e28b..2764f7c 100644 --- a/templates/weblate.conf +++ b/templates/weblate.conf @@ -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;