Skip to content

Commit

Permalink
fix: http_proxy 环境变量为空检查
Browse files Browse the repository at this point in the history
  • Loading branch information
RockChinQ committed Nov 12, 2024
1 parent 78005f8 commit 7c19785
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/utils/proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ async def initialize(self):
self.forward_proxies['https://'] = self.ap.system_cfg.data['network-proxies']['https']

# 设置到环境变量
os.environ['HTTP_PROXY'] = self.forward_proxies['http://']
os.environ['HTTPS_PROXY'] = self.forward_proxies['https://']
os.environ['HTTP_PROXY'] = self.forward_proxies['http://'] or ''
os.environ['HTTPS_PROXY'] = self.forward_proxies['https://'] or ''

def get_forward_proxies(self) -> dict:
return self.forward_proxies.copy()

0 comments on commit 7c19785

Please sign in to comment.