mirror of
https://github.com/searxng/searxng.git
synced 2024-11-22 12:10:11 +01:00
[mod] do not proxify images if image proxy is not set
This commit is contained in:
parent
b30bc5eeeb
commit
6243639f01
@ -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'),
|
||||
|
Loading…
Reference in New Issue
Block a user