diff options
author | Alexandre Flament <alex@al-f.net> | 2023-09-23 21:22:59 +0000 |
---|---|---|
committer | Alexandre Flament <alex@al-f.net> | 2023-09-24 11:01:11 +0200 |
commit | 19383921d7e7153a34a29a37c252197772cfd1c8 (patch) | |
tree | e341c29ab0ac2947b6a7331ce93ecf5284e495f3 /searx/webapp.py | |
parent | 1851f271548354a9faa023f8fde7d8085b27d7d9 (diff) | |
download | searxng-19383921d7e7153a34a29a37c252197772cfd1c8.tar.gz searxng-19383921d7e7153a34a29a37c252197772cfd1c8.zip |
/config: expose limiter configuration
Diffstat (limited to 'searx/webapp.py')
-rwxr-xr-x | searx/webapp.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/searx/webapp.py b/searx/webapp.py index 2973f53bb..9c7dbba1b 100755 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -57,6 +57,7 @@ from searx import ( ) from searx import infopage +from searx.botdetection import limiter from searx.data import ENGINE_DESCRIPTIONS from searx.results import Timing from searx.settings_defaults import OUTPUT_FORMATS @@ -1265,6 +1266,8 @@ def config(): for _ in plugins: _plugins.append({'name': _.name, 'enabled': _.default_on}) + _limiter_cfg = limiter.get_cfg() + return jsonify( { 'categories': list(categories.keys()), @@ -1284,6 +1287,11 @@ def config(): 'GIT_BRANCH': GIT_BRANCH, 'DOCS_URL': get_setting('brand.docs_url'), }, + 'limiter': { + 'enabled': settings['server']['limiter'], + 'botdetection.ip_limit.link_token': _limiter_cfg.get('botdetection.ip_limit.link_token'), + 'botdetection.ip_lists.pass_searxng_org': _limiter_cfg.get('botdetection.ip_lists.pass_searxng_org'), + }, 'doi_resolvers': list(settings['doi_resolvers'].keys()), 'default_doi_resolver': settings['default_doi_resolver'], } |