1
0
mirror of https://github.com/searxng/searxng.git synced 2024-11-17 18:00:12 +01:00

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

This commit is contained in:
Adam Tauber 2016-10-30 21:15:18 +01:00
parent b30bc5eeeb
commit 6243639f01

View File

@ -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'),