Browse Source

[mod] do not proxify images if image proxy is not set

Adam Tauber 8 years ago
parent
commit
6243639f01
1 changed files with 3 additions and 3 deletions
  1. 3 3
      searx/webapp.py

+ 3 - 3
searx/webapp.py

@@ -266,15 +266,15 @@ def proxify(url):
 
 def image_proxify(url):
 
-    if settings.get('result_proxy'):
-        return proxify(url)
-
     if url.startswith('//'):
         url = 'https:' + url
 
     if not request.preferences.get_value('image_proxy'):
         return url
 
+    if settings.get('result_proxy'):
+        return proxify(url)
+
     h = hmac.new(settings['server']['secret_key'], url.encode('utf-8'), hashlib.sha256).hexdigest()
 
     return '{0}?{1}'.format(url_for('image_proxy'),