mirror of
https://github.com/HumanAIGC-Engineering/gradio-webrtc.git
synced 2026-02-05 18:09:23 +08:00
fix: fail to use CLOUDFLARE_TURN_KEY_* even if HF_TOKEN is missing (#307)
This commit is contained in:
committed by
GitHub
parent
4ac69ee219
commit
bf71b2b0e9
@@ -137,7 +137,7 @@ def get_cloudflare_turn_credentials(
|
|||||||
"""
|
"""
|
||||||
if hf_token is None:
|
if hf_token is None:
|
||||||
hf_token = os.getenv("HF_TOKEN")
|
hf_token = os.getenv("HF_TOKEN")
|
||||||
if hf_token is not None:
|
if hf_token:
|
||||||
return httpx.get(
|
return httpx.get(
|
||||||
CLOUDFLARE_FASTRTC_TURN_URL,
|
CLOUDFLARE_FASTRTC_TURN_URL,
|
||||||
headers={"Authorization": f"Bearer {hf_token}"},
|
headers={"Authorization": f"Bearer {hf_token}"},
|
||||||
|
|||||||
Reference in New Issue
Block a user