mirror of
https://github.com/searxng/searxng.git
synced 2025-07-12 15:59:21 +02:00
[enh] basic support for http proxy (see #236)
This commit is contained in:
parent
33516256fd
commit
cde37be4f5
3 changed files with 13 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue