fix: fail to use CLOUDFLARE_TURN_KEY_* even if HF_TOKEN is missing (#307)

This commit is contained in:
Mohamed Ted Meftah
2025-05-12 17:24:39 +04:00
committed by GitHub
parent 4ac69ee219
commit bf71b2b0e9

View File

@@ -137,7 +137,7 @@ def get_cloudflare_turn_credentials(
"""
if hf_token is None:
hf_token = os.getenv("HF_TOKEN")
if hf_token is not None:
if hf_token:
return httpx.get(
CLOUDFLARE_FASTRTC_TURN_URL,
headers={"Authorization": f"Bearer {hf_token}"},