mirror of
https://github.com/searxng/searxng.git
synced 2024-11-04 20:30:11 +01:00
[fix] opensearch on chromium for android (#2132)
This commit is contained in:
parent
27d74826f1
commit
a5e6423c39
@ -6,7 +6,7 @@
|
||||
<Image>{{ urljoin(host, url_for('static', filename='img/favicon.png')) }}</Image>
|
||||
<LongName>searx metasearch</LongName>
|
||||
{% if opensearch_method == 'get' %}
|
||||
<Url rel="results" type="text/html" method="get" template="{{ host }}search?q={searchTerms}"/>
|
||||
<Url rel="results" type="text/html" method="get" template="{{ host }}?q={searchTerms}"/>
|
||||
{% else %}
|
||||
<Url rel="results" type="text/html" method="post" template="{{ host }}">
|
||||
<Param name="q" value="{searchTerms}" />
|
||||
|
@ -463,6 +463,9 @@ def pre_request():
|
||||
request.errors = []
|
||||
|
||||
preferences = Preferences(themes, list(categories.keys()), engines, plugins)
|
||||
user_agent = request.headers.get('User-Agent', '').lower()
|
||||
if 'webkit' in user_agent and 'android' in user_agent:
|
||||
preferences.key_value_settings['method'].value = 'GET'
|
||||
request.preferences = preferences
|
||||
try:
|
||||
preferences.parse_dict(request.cookies)
|
||||
|
Loading…
Reference in New Issue
Block a user