You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by si...@apache.org on 2019/08/10 09:14:56 UTC
[pulsar] branch master updated: requests should respect no_proxy
env variable (#4867)
This is an automated email from the ASF dual-hosted git repository.
sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new 648f0c8 requests should respect no_proxy env variable (#4867)
648f0c8 is described below
commit 648f0c827c9173d42a9f35e2c1da8d171fbe5dd2
Author: Heiss <52...@users.noreply.github.com>
AuthorDate: Sat Aug 10 11:14:51 2019 +0200
requests should respect no_proxy env variable (#4867)
If you want to specify a no_proxy variable in your dockerfile or docker-compose.yml, then this little fix respects the variable in get-requests. Otherwise the proxies could break your docker namespace lookup.
---
dashboard/django/collector.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dashboard/django/collector.py b/dashboard/django/collector.py
index 22974e3..5bce4ef 100755
--- a/dashboard/django/collector.py
+++ b/dashboard/django/collector.py
@@ -461,7 +461,7 @@ if __name__ == "__main__":
logger.info(http_headers)
global http_proxyes
- http_proxyes = {}
+ http_proxyes = { "no_proxy": os.getenv("NO_PROXY", "") }
if args.proxy:
http_proxyes['http'] = args.proxy
http_proxyes['https'] = args.proxy