summaryrefslogtreecommitdiff
path: root/searx/botdetection/limiter.toml
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2023-06-01 15:41:48 +0200
committerMarkus Heiser <markus.heiser@darmarit.de>2023-06-01 15:51:14 +0200
commit281e36f4b7848374535d5e953050ae73423191ca (patch)
treef7bda906459c8e796ec688a0007191f3c3609d63 /searx/botdetection/limiter.toml
parent38431d2e142b7da6a9b48aad203f02a2eff7e6fd (diff)
[fix] limiter: replace real_ip by IPv4/v6 network
Closes: https://github.com/searxng/searxng/issues/2477 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/botdetection/limiter.toml')
-rw-r--r--searx/botdetection/limiter.toml20
1 files changed, 17 insertions, 3 deletions
diff --git a/searx/botdetection/limiter.toml b/searx/botdetection/limiter.toml
index af797d32c..71a231e8f 100644
--- a/searx/botdetection/limiter.toml
+++ b/searx/botdetection/limiter.toml
@@ -1,8 +1,22 @@
+[real_ip]
+
+# Number of values to trust for X-Forwarded-For.
+
+x_for = 1
+
+# The prefix defines the number of leading bits in an address that are compared
+# to determine whether or not an address is part of a (client) network.
+
+ipv4_prefix = 32
+ipv6_prefix = 48
+
[botdetection.ip_limit]
+# To get unlimited access in a local network, by default link-lokal addresses
+# (networks) are not monitored by the ip_limit
+filter_link_local = false
+
+# acrivate link_token method in the ip_limit method
link_token = false
-[real_ip]
-# Number of values to trust for X-Forwarded-For.
-x_for = 1