Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: comfyui tool supports https (#11823)

傻笑zz15485010505c
diff --git a/api/core/tools/provider/builtin/comfyui/comfyui.py b/api/core/tools/provider/builtin/comfyui/comfyui.py
index bab690af829..a8127dd23f1 100644
--- a/api/core/tools/provider/builtin/comfyui/comfyui.py
+++ b/api/core/tools/provider/builtin/comfyui/comfyui.py
@@ -11,7 +11,10 @@ class ComfyUIProvider(BuiltinToolProviderController):
def _validate_credentials(self, credentials: dict[str, Any]) -> None:
ws = websocket.WebSocket()
base_url = URL(credentials.get("base_url"))
- ws_address = f"ws://{base_url.authority}/ws?clientId=test123"
+ ws_protocol = "ws"
+ if base_url.scheme == "https":
+ ws_protocol = "wss"
+ ws_address = f"{ws_protocol}://{base_url.authority}/ws?clientId=test123"
try:
ws.connect(ws_address)