[fix] simple theme: fix autocomplete

AJAX requests send the X-Requested-With HTTP header,
so searx.webapp.autocompleter returns the results with the expected data format.

Related to #2127
Close #2203
This commit is contained in:
Alexandre Flament 2020-09-19 10:13:05 +02:00
parent ae07f4a211
commit c23401e9fa
9 changed files with 10 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/*! searx | 04-06-2020 | */
/*! searx | 19-09-2020 | https://github.com/asciimoo/searx */
/*
* searx, A privacy-respecting, hackable metasearch engine
*

Binary file not shown.

View File

@ -1,4 +1,4 @@
/*! searx | 04-06-2020 | */
/*! searx | 19-09-2020 | https://github.com/asciimoo/searx */
/*
* searx, A privacy-respecting, hackable metasearch engine
*

Binary file not shown.

Binary file not shown.

View File

@ -1531,6 +1531,10 @@ module.exports = AutoComplete;
Url: "./autocompleter",
EmptyMessage: searx.no_item_found,
HttpMethod: searx.method,
HttpHeaders: {
"Content-type": "application/x-www-form-urlencoded",
"X-Requested-With": "XMLHttpRequest"
},
MinChars: 4,
Delay: 300,
}, "#" + qinput_id);

Binary file not shown.

View File

@ -75,6 +75,10 @@
Url: "./autocompleter",
EmptyMessage: searx.no_item_found,
HttpMethod: searx.method,
HttpHeaders: {
"Content-type": "application/x-www-form-urlencoded",
"X-Requested-With": "XMLHttpRequest"
},
MinChars: 4,
Delay: 300,
}, "#" + qinput_id);