aboutsummaryrefslogtreecommitdiff
path: root/cgi/templates/bans_geo
diff options
context:
space:
mode:
authorLibravatar bai 2020-07-24 05:30:23 -0400
committerLibravatar bai 2020-07-24 05:30:23 -0400
commit7293ea47717c49d66651edef02c5c8def7df9333 (patch)
tree50ddcd111793def89faa23936d1986edb5973777 /cgi/templates/bans_geo
parente67fc0c6ac081b71c819844591d7b1d317071b05 (diff)
downloadweabot-7293ea47717c49d66651edef02c5c8def7df9333.tar.gz
weabot-7293ea47717c49d66651edef02c5c8def7df9333.tar.xz
weabot-7293ea47717c49d66651edef02c5c8def7df9333.zip
Optimizado listado de bans para nginx usando el módulo geo
Diffstat (limited to 'cgi/templates/bans_geo')
-rw-r--r--cgi/templates/bans_geo14
1 files changed, 14 insertions, 0 deletions
diff --git a/cgi/templates/bans_geo b/cgi/templates/bans_geo
new file mode 100644
index 0000000..64687e8
--- /dev/null
+++ b/cgi/templates/bans_geo
@@ -0,0 +1,14 @@
+geo $bans_global {
+ default 0;
+<?py for ip in global_bans: ?>
+ #{ip} 1;
+<?py #endfor ?>
+}
+<?py for board, bans in board_bans.iteritems(): ?>
+geo $bans_#{board} {
+ default 0;
+ <?py for ip in bans: ?>
+ #{ip} 1;
+ <?py #endfor ?>
+}
+<?py #endfor ?>