diff options
-rw-r--r-- | searx/templates/simple/opensearch.xml | 2 | ||||
-rwxr-xr-x | searx/webapp.py | 10 |
2 files changed, 1 insertions, 11 deletions
diff --git a/searx/templates/simple/opensearch.xml b/searx/templates/simple/opensearch.xml index 212cecc80..5176c012c 100644 --- a/searx/templates/simple/opensearch.xml +++ b/searx/templates/simple/opensearch.xml @@ -15,7 +15,7 @@ {% if autocomplete %} <Url rel="suggestions" type="application/x-suggestions+json" method="{{ opensearch_method }}" template="{{ url_for('autocompleter', _external=True) }}?q={searchTerms}"/> {% endif %} - <Url rel="self" type="application/opensearchdescription+xml" method="{{ opensearch_method }}" template="{{ opensearch_url }}" /> + <Url rel="self" type="application/opensearchdescription+xml" method="{{ opensearch_method }}" template="{{ url_for('opensearch', _external=True) }}" /> <Query role="example" searchTerms="SearXNG" /> <moz:SearchForm>{{ url_for('search', _external=True) }}</moz:SearchForm> </OpenSearchDescription> diff --git a/searx/webapp.py b/searx/webapp.py index c64ef0fc0..9672db3ab 100755 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -438,16 +438,6 @@ 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 |