mirror of
https://github.com/searxng/searxng
synced 2024-01-01 18:24:07 +00:00
[enh] update opensearch.xml to match major search engines opensearch.xml
This commit is contained in:
parent
4a8a16559a
commit
08c13daf85
@ -6,23 +6,13 @@
|
|||||||
<Image>{{ urljoin(host, url_for('static', filename='img/favicon.png')) }}</Image>
|
<Image>{{ urljoin(host, url_for('static', filename='img/favicon.png')) }}</Image>
|
||||||
<LongName>searx metasearch</LongName>
|
<LongName>searx metasearch</LongName>
|
||||||
{% if opensearch_method == 'get' %}
|
{% if opensearch_method == 'get' %}
|
||||||
<Url type="text/html" method="get" template="{{ host }}search?q={searchTerms}"/>
|
<Url rel="results" type="text/html" method="get" template="{{ host }}search?q={searchTerms}"/>
|
||||||
{% if autocomplete %}
|
|
||||||
<Url type="application/x-suggestions+json" method="get" template="{{ host }}autocompleter">
|
|
||||||
<Param name="format" value="x-suggestions" />
|
|
||||||
<Param name="q" value="{searchTerms}" />
|
|
||||||
</Url>
|
|
||||||
{% endif %}
|
|
||||||
{% else %}
|
{% else %}
|
||||||
<Url type="text/html" method="post" template="{{ host }}">
|
<Url rel="results" type="text/html" method="post" template="{{ host }}">
|
||||||
<Param name="q" value="{searchTerms}" />
|
|
||||||
</Url>
|
|
||||||
{% if autocomplete %}
|
|
||||||
<!-- TODO, POST REQUEST doesn't work -->
|
|
||||||
<Url type="application/x-suggestions+json" method="get" template="{{ host }}autocompleter">
|
|
||||||
<Param name="format" value="x-suggestions" />
|
|
||||||
<Param name="q" value="{searchTerms}" />
|
<Param name="q" value="{searchTerms}" />
|
||||||
</Url>
|
</Url>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if autocomplete %}
|
||||||
|
<Url rel="suggestions" type="application/json" template="{{ host }}autocompleter"/>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</OpenSearchDescription>
|
</OpenSearchDescription>
|
||||||
|
@ -949,7 +949,7 @@ def opensearch():
|
|||||||
|
|
||||||
resp = Response(response=ret,
|
resp = Response(response=ret,
|
||||||
status=200,
|
status=200,
|
||||||
mimetype="text/xml")
|
mimetype="application/opensearchdescription+xml")
|
||||||
return resp
|
return resp
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user