AMSC 请求绕过代理 trust_env=False,修复容器内 SSL 验证失败
This commit is contained in:
@@ -191,7 +191,7 @@ class AmscAwosSourceMixin:
|
|||||||
return headers
|
return headers
|
||||||
|
|
||||||
def _http_get_json(self, url: str, *, headers: Optional[Dict[str, str]] = None) -> Optional[Dict[str, Any]]:
|
def _http_get_json(self, url: str, *, headers: Optional[Dict[str, str]] = None) -> Optional[Dict[str, Any]]:
|
||||||
with httpx.Client(verify=False) as client:
|
with httpx.Client(verify=False, trust_env=False) as client:
|
||||||
response = client.get(url, headers=headers, timeout=getattr(self, "timeout", 10.0))
|
response = client.get(url, headers=headers, timeout=getattr(self, "timeout", 10.0))
|
||||||
response.raise_for_status()
|
response.raise_for_status()
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user