diff options
author | Markus Heiser <markus.heiser@darmarit.de> | 2023-05-27 18:58:06 +0200 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarit.de> | 2023-06-01 14:38:53 +0200 |
commit | 9d7456fd6c49fbd96f03f6a5dedd6ba05e924d0a (patch) | |
tree | 4a7b4f35e5c237852a20d9689454984660dc23c4 /searx/botdetection | |
parent | 66fdec0eb92bf11c0bc477d6fb1df3dc783e4dcb (diff) | |
download | searxng-9d7456fd6c49fbd96f03f6a5dedd6ba05e924d0a.tar.gz searxng-9d7456fd6c49fbd96f03f6a5dedd6ba05e924d0a.zip |
[fix] limiter.toml: botdetection.ip_limit turn off link_token by default
To activate the ``link_token`` method in the ``ip_limit`` method add the
following to your ``/etc/searxng/limiter.toml``::
[botdetection.ip_limit]
link_token = true
Related: https://github.com/searxng/searxng/pull/2357#issuecomment-1554116941
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/botdetection')
-rw-r--r-- | searx/botdetection/ip_limit.py | 15 | ||||
-rw-r--r-- | searx/botdetection/limiter.toml | 2 |
2 files changed, 13 insertions, 4 deletions
diff --git a/searx/botdetection/ip_limit.py b/searx/botdetection/ip_limit.py index 2646920c2..e72015190 100644 --- a/searx/botdetection/ip_limit.py +++ b/searx/botdetection/ip_limit.py @@ -9,9 +9,18 @@ bot request. This method requires a redis DB and needs a HTTP X-Forwarded-For_ header. To take privacy only the hash value of an IP is stored in the redis DB and at least for a maximum of 10 minutes. -The :py:obj:`link_token` method is used to investigate whether a request is -*suspicious*. If the :py:obj:`link_token` method is activated and a request is -*suspicious* the request rates are reduced: +The :py:obj:`.link_token` method can be used to investigate whether a request is +*suspicious*. To activate the :py:obj:`.link_token` method in the +:py:obj:`.ip_limit` method add the following to your +``/etc/searxng/limiter.toml``: + +.. code:: toml + + [botdetection.ip_limit] + link_token = true + +If the :py:obj:`.link_token` method is activated and a request is *suspicious* +the request rates are reduced: - :py:obj:`BURST_MAX` -> :py:obj:`BURST_MAX_SUSPICIOUS` - :py:obj:`LONG_MAX` -> :py:obj:`LONG_MAX_SUSPICIOUS` diff --git a/searx/botdetection/limiter.toml b/searx/botdetection/limiter.toml index 30cd1b53c..28c4e7589 100644 --- a/searx/botdetection/limiter.toml +++ b/searx/botdetection/limiter.toml @@ -1,3 +1,3 @@ [botdetection.ip_limit] -link_token = true
\ No newline at end of file +link_token = false
\ No newline at end of file |