Skip to content
Snippets Groups Projects

archwiki: Add simple challenge for Chinese IP addresses

All threads resolved!
1 file
+ 6
1
Compare changes
  • Side-by-side
  • Inline
@@ -15,11 +15,16 @@ upstream archwiki {
# Challenge the client if the cookie "challenge" is not set to
# the value of "archwiki_nginx_challenge_value".
map $cookie_challenge $challenge_required {
map $cookie_challenge $challenge_required2 {
default 1;
{{ archwiki_nginx_challenge_value }} 0;
}
map $request_uri $challenge_required {
default 0;
~^/index\.php\? $challenge_required2;
}
geoip2 /var/lib/GeoIP/GeoLite2-Country.mmdb {
auto_reload 60m;
$geoip2_data_country_iso_code country iso_code;
Loading