mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 15:33:30 +00:00
Don't trust env while accessing Tornado.
This fixes a problem where the requests to Tornado would attempt to use a configured outgoing HTTP proxy, when really we want to connect directly to localhost. Fixes: #468.
This commit is contained in:
@@ -36,6 +36,11 @@ import six
|
||||
from six import text_type
|
||||
|
||||
requests_client = requests.Session()
|
||||
for host in ['127.0.0.1', 'localhost']:
|
||||
if settings.TORNADO_SERVER and host in settings.TORNADO_SERVER:
|
||||
# This seems like the only working solution to ignore proxy in
|
||||
# requests library.
|
||||
requests_client.trust_env = False
|
||||
|
||||
# The idle timeout used to be a week, but we found that in that
|
||||
# situation, queues from dead browser sessions would grow quite large
|
||||
|
||||
Reference in New Issue
Block a user