forked from Ponysearch/Ponysearch
[mod] do not proxify images if image proxy is not set
This commit is contained in:
parent
b30bc5eeeb
commit
6243639f01
1 changed files with 3 additions and 3 deletions
|
@ -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 a new issue