You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Fix] Exclude localhost from hitting proxies for metadata service requests (#877)
## What changes are proposed in this pull request?
Exclude localhost from hitting proxies for metadata service requests
`requests` package doesn't do it by default.
Relevant issue:
databricks/databricks-vscode#916 (comment)
## How is this tested?
Tested manually by running this code against real metadata service of
the logged in databricks vscode extension:
```python
import requests
import os
os.environ["HTTP_PROXY"] = "http://test.com"
resp = requests.get("http://127.0.0.1:53468/redacted",
timeout=10000,
headers={
"X-Databricks-Metadata-Version": "1",
"X-Databricks-Host": "https://redacted.databricks.com/"
}, proxies={"no_proxy": "localhost,127.0.0.1"})
print(resp.text)
```
The code fails without the no_proxy option
0 commit comments