mirror of
https://github.com/searxng/searxng
synced 2024-01-01 18:24:07 +00:00
[enh] add blocked_plugins setting do completly remove plugin from query processing
This commit is contained in:
parent
599d882d0a
commit
e04659853a
@ -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)
|
||||
|
@ -157,6 +157,12 @@ outgoing:
|
||||
# - plugin2
|
||||
# - ...
|
||||
|
||||
# Plugins listed here will be loaded, but will not be registered into plugins chain.
|
||||
# The engine will not use them to process queries.
|
||||
#
|
||||
# blocked_plugins:
|
||||
# - 'Self Informations'
|
||||
|
||||
# Comment or un-comment plugin to activate / deactivate by default.
|
||||
#
|
||||
# enabled_plugins:
|
||||
|
Loading…
Reference in New Issue
Block a user