Spaces:
Sleeping
Sleeping
Commit
·
35a55c1
1
Parent(s):
05340a0
updated
Browse files
server.py
CHANGED
@@ -66,7 +66,7 @@ async def bot_connect(request: Request) -> Dict[Any, Any]:
|
|
66 |
# return {"ws_url": "ws://localhost:7860/ws"}
|
67 |
# Get the host from the request headers for dynamic URL generation
|
68 |
host = request.headers.get("host", "localhost:7860")
|
69 |
-
protocol = "wss" if request.url.scheme == "https" else "
|
70 |
return {"ws_url": f"{protocol}://{host}/ws"}
|
71 |
|
72 |
|
|
|
66 |
# return {"ws_url": "ws://localhost:7860/ws"}
|
67 |
# Get the host from the request headers for dynamic URL generation
|
68 |
host = request.headers.get("host", "localhost:7860")
|
69 |
+
protocol = "wss" if request.url.scheme == "https" else "wss"
|
70 |
return {"ws_url": f"{protocol}://{host}/ws"}
|
71 |
|
72 |
|