on master help sign in
[mod] do not proxify images if image proxy is not set
commit6243639f013b18fbdf6d667895f32fda6048d8f8 authorAdam Tauber <asciimoo@gmail.com> dateSun 30 Oct 2016, 21:15 (10 years ago) parentb30bc5e
1 file changed+3−3
searx/webapp.py+3−3
searx/webapp.py+3−3
@@ -266,15 +266,15 @@ def proxify(url):
266266
267267def image_proxify(url):
268268
269− if settings.get('result_proxy'):
270− return proxify(url)
271−
272269 if url.startswith('//'):
273270 url = 'https:' + url
274271
275272 if not request.preferences.get_value('image_proxy'):
276273 return url
277274
275+ if settings.get('result_proxy'):
276+ return proxify(url)
277+
278278 h = hmac.new(settings['server']['secret_key'], url.encode('utf-8'), hashlib.sha256).hexdigest()
279279
280280 return '{0}?{1}'.format(url_for('image_proxy'),