summaryrefslogtreecommitdiff
path: root/searx/webapp.py
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2016-10-30 21:15:18 +0100
committerAdam Tauber <asciimoo@gmail.com>2016-10-30 21:15:46 +0100
commit6243639f013b18fbdf6d667895f32fda6048d8f8 (patch)
treee46cca468bebb7faad08d681dc03e42e4e8adcae /searx/webapp.py
parentb30bc5eeeb1202bfe20ceb488336fc12b59c458c (diff)
downloadsearxng-6243639f013b18fbdf6d667895f32fda6048d8f8.tar.gz
searxng-6243639f013b18fbdf6d667895f32fda6048d8f8.zip
[mod] do not proxify images if image proxy is not set
Diffstat (limited to 'searx/webapp.py')
-rw-r--r--searx/webapp.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/searx/webapp.py b/searx/webapp.py
index d18288599..3fd127eca 100644
--- a/searx/webapp.py
+++ b/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'),