mirror of
https://github.com/searxng/searxng.git
synced 2025-12-23 04:00:02 +00:00
[enh] basic support for http proxy (see #236)
This commit is contained in:
@@ -110,6 +110,7 @@ _category_names = (gettext('files'),
|
||||
gettext('news'),
|
||||
gettext('map'))
|
||||
|
||||
outgoing_proxies = settings.get('outgoing_proxies', None)
|
||||
|
||||
@babel.localeselector
|
||||
def get_locale():
|
||||
@@ -638,7 +639,8 @@ def image_proxy():
|
||||
resp = requests.get(url,
|
||||
stream=True,
|
||||
timeout=settings['server'].get('request_timeout', 2),
|
||||
headers=headers)
|
||||
headers=headers,
|
||||
proxies=outgoing_proxies)
|
||||
|
||||
if resp.status_code == 304:
|
||||
return '', resp.status_code
|
||||
|
||||
Reference in New Issue
Block a user