Pārlūkot izejas kodu

Merge pull request #274 from ldidry/fix-271

Fixes #271
Adam Tauber 10 gadus atpakaļ
vecāks
revīzija
b8e9f5105c
1 mainītis faili ar 4 papildinājumiem un 0 dzēšanām
  1. 4
    0
      searx/webapp.py

+ 4
- 0
searx/webapp.py Parādīt failu

@@ -687,6 +687,10 @@ Disallow: /preferences
687 687
 @app.route('/opensearch.xml', methods=['GET'])
688 688
 def opensearch():
689 689
     method = 'post'
690
+
691
+    if request.cookies.get('method', 'POST') == 'GET':
692
+        method = 'get'
693
+
690 694
     # chrome/chromium only supports HTTP GET....
691 695
     if request.headers.get('User-Agent', '').lower().find('webkit') >= 0:
692 696
         method = 'get'