mirror of
https://github.com/searxng/searxng.git
synced 2026-07-21 07:21:26 +00:00
[enh] add blocked_plugins setting do completly remove plugin from query processing
This commit is contained in:
@@ -226,7 +226,10 @@ def plugin_module_names():
|
||||
|
||||
|
||||
def initialize(app):
|
||||
# it is possible to block plugins from being registered into plugin chain
|
||||
blocked_plugins = settings['outgoing'].get('blocked_plugins', [])
|
||||
|
||||
for module_name, external in plugin_module_names():
|
||||
plugin = load_and_initialize_plugin(module_name, external, (app, settings))
|
||||
if plugin:
|
||||
if plugin and plugin.name not in blocked_plugins:
|
||||
plugins.register(plugin)
|
||||
|
||||
Reference in New Issue
Block a user