diff options
| author | Alexandre Flament <alex@al-f.net> | 2020-09-19 10:13:05 +0200 |
|---|---|---|
| committer | Alexandre Flament <alex@al-f.net> | 2020-09-19 10:13:05 +0200 |
| commit | c23401e9fa3504e64ecf8dc5eae59e3f532d16fe (patch) | |
| tree | 23ed62c8d2f3f263b4ff2995d0534b6225ef3395 /searx/static/themes/simple/js/searx_src | |
| parent | ae07f4a211ecba0331bcab5903e3263c646f8bdb (diff) | |
[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
Diffstat (limited to 'searx/static/themes/simple/js/searx_src')
| -rw-r--r-- | searx/static/themes/simple/js/searx_src/searx_search.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/searx/static/themes/simple/js/searx_src/searx_search.js b/searx/static/themes/simple/js/searx_src/searx_search.js index 580d98d6a..7b652fa92 100644 --- a/searx/static/themes/simple/js/searx_src/searx_search.js +++ b/searx/static/themes/simple/js/searx_src/searx_search.js @@ -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); |