summaryrefslogtreecommitdiff
path: root/searx/settings_defaults.py
diff options
context:
space:
mode:
authorLéon Tiekötter <leon@tiekoetter.com>2022-11-21 23:55:04 +0100
committerAlexandre Flament <alex@al-f.net>2023-01-15 09:00:32 +0000
commit0cedb1c6d8d38c911176cab954d858fe937cef71 (patch)
treebf76db64f14e00515bd7fd64aa73e1cfab902bf5 /searx/settings_defaults.py
parentb720a495f0cc5372d07ed68e0d8a5ffa89a14b51 (diff)
downloadsearxng-0cedb1c6d8d38c911176cab954d858fe937cef71.tar.gz
searxng-0cedb1c6d8d38c911176cab954d858fe937cef71.zip
Add search.suspended_times settings
Make suspended_time changeable in settings.yml Allow different values to be set for different exceptions. Co-authored-by: Alexandre Flament <alex@al-f.net>
Diffstat (limited to 'searx/settings_defaults.py')
-rw-r--r--searx/settings_defaults.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/searx/settings_defaults.py b/searx/settings_defaults.py
index cfa1bb47c..7baa23cac 100644
--- a/searx/settings_defaults.py
+++ b/searx/settings_defaults.py
@@ -160,6 +160,14 @@ SCHEMA = {
'languages': SettingSublistValue(LANGUAGE_CODES, LANGUAGE_CODES),
'ban_time_on_fail': SettingsValue(numbers.Real, 5),
'max_ban_time_on_fail': SettingsValue(numbers.Real, 120),
+ 'suspended_times': {
+ 'SearxEngineAccessDenied': SettingsValue(numbers.Real, 86400),
+ 'SearxEngineCaptcha': SettingsValue(numbers.Real, 86400),
+ 'SearxEngineTooManyRequests': SettingsValue(numbers.Real, 3600),
+ 'cf_SearxEngineCaptcha': SettingsValue(numbers.Real, 1296000),
+ 'cf_SearxEngineAccessDenied': SettingsValue(numbers.Real, 86400),
+ 'recaptcha_SearxEngineCaptcha': SettingsValue(numbers.Real, 604800),
+ },
'formats': SettingsValue(list, OUTPUT_FORMATS),
},
'server': {