diff options
author | Alexandre Flament <alex@al-f.net> | 2015-04-25 11:44:53 +0200 |
---|---|---|
committer | Alexandre Flament <alex@al-f.net> | 2015-04-25 11:44:53 +0200 |
commit | cde37be4f594451c1b791b7a3a66d78c2bc44d54 (patch) | |
tree | d91da5b848a4413ffaf6cda9e777465df1028117 /searx/webapp.py | |
parent | 33516256fd60d5bf6dcdf38c8a31f4038ecf0524 (diff) | |
download | searxng-cde37be4f594451c1b791b7a3a66d78c2bc44d54.tar.gz searxng-cde37be4f594451c1b791b7a3a66d78c2bc44d54.zip |
[enh] basic support for http proxy (see #236)
Diffstat (limited to 'searx/webapp.py')
-rw-r--r-- | searx/webapp.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/searx/webapp.py b/searx/webapp.py index 52ced1363..8a0adefd5 100644 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -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 |