We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 87e4be9 commit 5012bedCopy full SHA for 5012bed
src/huggingface_hub/utils/_http.py
@@ -340,8 +340,7 @@ def fix_hf_endpoint_in_url(url: str, endpoint: Optional[str]) -> str:
340
"""
341
endpoint = endpoint.rstrip("/") if endpoint else constants.ENDPOINT
342
# check if a proxy has been set => if yes, update the returned URL to use the proxy
343
- if endpoint not in (None, constants._HF_DEFAULT_ENDPOINT, constants._HF_DEFAULT_STAGING_ENDPOINT):
344
- endpoint.rstrip('/')
+ if endpoint not in (constants._HF_DEFAULT_ENDPOINT, constants._HF_DEFAULT_STAGING_ENDPOINT):
345
url = url.replace(constants._HF_DEFAULT_ENDPOINT, endpoint)
346
url = url.replace(constants._HF_DEFAULT_STAGING_ENDPOINT, endpoint)
347
return url
0 commit comments