From c0b97c65438be44dd5f5e64786576763993ce424 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Sun, 25 Feb 2024 18:15:34 +0100 Subject: [PATCH] [fix] re-add opensearch_url / its used in based.html The URL was accidentally deleted in a85907a98, but is still required in base.html for auto-discovery / from base.html:: Signed-off-by: Markus Heiser --- searx/webapp.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/searx/webapp.py b/searx/webapp.py index 9672db3ab..c64ef0fc0 100755 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -438,6 +438,16 @@ def render(template_name: str, **kwargs): kwargs['cache_url'] = settings['ui']['cache_url'] kwargs['get_result_template'] = get_result_template kwargs['doi_resolver'] = get_doi_resolver(request.preferences) + kwargs['opensearch_url'] = ( + url_for('opensearch') + + '?' + + urlencode( + { + 'method': request.preferences.get_value('method'), + 'autocomplete': request.preferences.get_value('autocomplete'), + } + ) + ) kwargs['urlparse'] = urlparse # scripts from plugins