forked from Ponysearch/Ponysearch
[fix] using different opensearch url to fix chrome POST request bug
This commit is contained in:
parent
44d3af9fb2
commit
a41c1392f0
2 changed files with 4 additions and 3 deletions
|
@ -4,8 +4,8 @@
|
||||||
<Description>Search searx</Description>
|
<Description>Search searx</Description>
|
||||||
<InputEncoding>UTF-8</InputEncoding>
|
<InputEncoding>UTF-8</InputEncoding>
|
||||||
<LongName>searx metasearch</LongName>
|
<LongName>searx metasearch</LongName>
|
||||||
{% if method == 'get' %}
|
{% if opensearch_method == 'get' %}
|
||||||
<Url type="text/html" method="get" template="{{ host }}?q={searchTerms}"/>
|
<Url type="text/html" method="get" template="{{ host }}search?q={searchTerms}"/>
|
||||||
{% if autocomplete %}
|
{% if autocomplete %}
|
||||||
<Url type="application/x-suggestions+json" method="get" template="{{ host }}autocompleter">
|
<Url type="application/x-suggestions+json" method="get" template="{{ host }}autocompleter">
|
||||||
<Param name="format" value="x-suggestions" />
|
<Param name="format" value="x-suggestions" />
|
||||||
|
|
|
@ -128,6 +128,7 @@ def render(template_name, **kwargs):
|
||||||
return render_template(template_name, **kwargs)
|
return render_template(template_name, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
|
@app.route('/search', methods=['GET', 'POST'])
|
||||||
@app.route('/', methods=['GET', 'POST'])
|
@app.route('/', methods=['GET', 'POST'])
|
||||||
def index():
|
def index():
|
||||||
"""Render index page.
|
"""Render index page.
|
||||||
|
@ -392,7 +393,7 @@ def opensearch():
|
||||||
method = 'get'
|
method = 'get'
|
||||||
|
|
||||||
ret = render('opensearch.xml',
|
ret = render('opensearch.xml',
|
||||||
method=method,
|
opensearch_method=method,
|
||||||
host=get_base_url())
|
host=get_base_url())
|
||||||
|
|
||||||
resp = Response(response=ret,
|
resp = Response(response=ret,
|
||||||
|
|
Loading…
Reference in a new issue