diff options
author | Alexandre Flament <alex@al-f.net> | 2020-11-16 12:44:07 +0100 |
---|---|---|
committer | Alexandre Flament <alex@al-f.net> | 2020-11-20 15:29:21 +0100 |
commit | 3786920df975b11c0feb7d8564eb19b634d32977 (patch) | |
tree | 3d0bdc1fb29ef3a5a400dd78960cc2cae22f8e1a /searx/webapp.py | |
parent | 2fc3b17c85512280173bb47f449cc2faa64b0501 (diff) | |
download | searxng-3786920df975b11c0feb7d8564eb19b634d32977.tar.gz searxng-3786920df975b11c0feb7d8564eb19b634d32977.zip |
[enh] Add multiple outgoing proxies
credits go to @bauruine see https://github.com/searx/searx/pull/1958
Diffstat (limited to 'searx/webapp.py')
-rwxr-xr-x | searx/webapp.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/searx/webapp.py b/searx/webapp.py index 2a93c3765..26416c5aa 100755 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -78,6 +78,7 @@ from searx.plugins import plugins from searx.plugins.oa_doi_rewrite import get_doi_resolver from searx.preferences import Preferences, ValidationException, LANGUAGE_CODES from searx.answerers import answerers +from searx.poolrequests import get_global_proxies # serve pages with HTTP/1.1 @@ -149,8 +150,6 @@ _category_names = (gettext('files'), gettext('onions'), gettext('science')) -outgoing_proxies = settings['outgoing'].get('proxies') or None - _flask_babel_get_translations = flask_babel.get_translations @@ -905,7 +904,7 @@ def image_proxy(): stream=True, timeout=settings['outgoing']['request_timeout'], headers=headers, - proxies=outgoing_proxies) + proxies=get_global_proxies()) if resp.status_code == 304: return '', resp.status_code |