From c23401e9fa3504e64ecf8dc5eae59e3f532d16fe Mon Sep 17 00:00:00 2001 From: Alexandre Flament Date: Sat, 19 Sep 2020 10:13:05 +0200 Subject: [PATCH] [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 --- searx/static/themes/simple/css/searx-rtl.css | 2 +- .../themes/simple/css/searx-rtl.min.css | Bin 26598 -> 26631 bytes searx/static/themes/simple/css/searx.css | 2 +- searx/static/themes/simple/css/searx.min.css | Bin 26563 -> 26596 bytes .../static/themes/simple/js/searx.head.min.js | Bin 742 -> 775 bytes searx/static/themes/simple/js/searx.js | 4 ++++ searx/static/themes/simple/js/searx.min.js | Bin 23911 -> 24045 bytes .../static/themes/simple/js/searx.min.js.map | Bin 30418 -> 30481 bytes .../simple/js/searx_src/searx_search.js | 4 ++++ 9 files changed, 10 insertions(+), 2 deletions(-) diff --git a/searx/static/themes/simple/css/searx-rtl.css b/searx/static/themes/simple/css/searx-rtl.css index bc8003476..abe013ee3 100644 --- a/searx/static/themes/simple/css/searx-rtl.css +++ b/searx/static/themes/simple/css/searx-rtl.css @@ -1,4 +1,4 @@ -/*! searx | 04-06-2020 | */ +/*! searx | 19-09-2020 | https://github.com/asciimoo/searx */ /* * searx, A privacy-respecting, hackable metasearch engine * diff --git a/searx/static/themes/simple/css/searx-rtl.min.css b/searx/static/themes/simple/css/searx-rtl.min.css index 5610729761192e450e61c5d2931eb1d6d41e3ac2..cafc2b9393cdc3cbeef97c20b83e41756e07e345 100644 GIT binary patch delta 69 zcmaEMp0WJ`qm{mvqC#!Ru7R1Zk%5r`kh9V1Y&rnjoeN|D diff --git a/searx/static/themes/simple/css/searx.css b/searx/static/themes/simple/css/searx.css index 74cc5b5ba..17a098f4f 100644 --- a/searx/static/themes/simple/css/searx.css +++ b/searx/static/themes/simple/css/searx.css @@ -1,4 +1,4 @@ -/*! searx | 04-06-2020 | */ +/*! searx | 19-09-2020 | https://github.com/asciimoo/searx */ /* * searx, A privacy-respecting, hackable metasearch engine * diff --git a/searx/static/themes/simple/css/searx.min.css b/searx/static/themes/simple/css/searx.min.css index e8acf69a04c0d4f7d353a6c54a9fa09d73d8042c..25f62f32b3dc28a22fca9723418a2e1b46290b3d 100644 GIT binary patch delta 69 zcmX?np7F_fMk{?SMTO$j#G(p?8U;g3T?0#9BLgD?ASa`wq@dVJUq3ywB%?G*FF8L~ UKe0GDGcz|oUmvVtqvWb|04k&y6951J delta 36 qcmaEIp7HQ`MoE1wMTO$j#G(p?8U+IrT>~>+BLgD?AZMf1s&oM3#S3}> diff --git a/searx/static/themes/simple/js/searx.head.min.js b/searx/static/themes/simple/js/searx.head.min.js index 8cd0df3d6c23c6b44c605586daecf189227202b6..7bbb6847b337c19f809dafa352f50fbda21a0c05 100644 GIT binary patch delta 56 zcmaFH+RipXTGvw7z*5)9z{o(MMj@l5q@dVJUq3ywB%?G*FF8L~Ke0GDGcz|oU%xmt Lv8ZCB`hF$=@o*CM delta 23 ecmZo?d&W9Jn#WYvz)aW3z{o(MMq#7JekK4*nFe0~ diff --git a/searx/static/themes/simple/js/searx.js b/searx/static/themes/simple/js/searx.js index 3e9ad3e7f..8fb2471b0 100644 --- a/searx/static/themes/simple/js/searx.js +++ b/searx/static/themes/simple/js/searx.js @@ -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); diff --git a/searx/static/themes/simple/js/searx.min.js b/searx/static/themes/simple/js/searx.min.js index 264a7fb4282b57ca032ab7f17a900c95b1cd6c80..ca3a420a210aabe00de69044e788a9cba76fa2c0 100644 GIT binary patch delta 105 zcmaF9i}CGl#tG88mbwO(x<&>@1`0I_86_nJ#a86s-NrAd0p`MLUu#mSkOx%v6} z#i@x!6&uwzMNK{>VXvyA6rmfGT3DJ|T#}li8xB;jWTh10>*E150V=LkyZJ^`KNA4J CDkew( delta 30 mcmaF6oALQB#tG6qrn&}Zx<&>@1`0I_8$C8fZH|xbV*&uFfeLy6 diff --git a/searx/static/themes/simple/js/searx.min.js.map b/searx/static/themes/simple/js/searx.min.js.map index 81e7ddffa3758da64d411856870d18b660b90655..fafc9644b663f012ac3393b93c3c25072e6bd5b4 100644 GIT binary patch delta 186 zcmccgmT}@c#tjA{0uj1FsfDGf#U-gJy5X568Jl%QbQ5$-J#-=+9TRn&9i1aGopn+j z9n+n3@`1bzCyPLxTqj4zd?%f3Cr8&3C)2>mF(rO7+MysFkwC)P)G1BJ)zQ%(s3qCa zF*ze_^3f7Mf%Fs|1E4-5Cy=2fE|!y(OONtpChG(`ItGJ;@?5eee=AkwD@F+AIF(FR TEi329b1!oNDk-15q)ZP02faJl delta 125 zcmbREj`7l4#tjA{o1I0p5||9UCeJGIleP%eiF9;~1QO1sPANLBj*kARI?0ZX$@-y_ zSxWr`w3BrVoE#mEoOGNWol9KICnuF2