Browse Source

[fix] valid https checking

asciimoo 11 years ago
parent
commit
c838492d6d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      searx/webapp.py

+ 1 - 1
searx/webapp.py

@@ -119,7 +119,7 @@ def opensearch():
     # chrome/chromium only supports HTTP GET....
     if request.headers.get('User-Agent', '').lower().find('webkit') >= 0:
         method = 'get'
-    if request.headers.get('Host', '').find('https://'):
+    if request.is_secure:
         scheme = 'https'
     ret = opensearch_xml.format(method=method, host=url_for('index', _external=True, _scheme=scheme))
     resp = Response(response=ret,