Skip to content

Commit 6c319cb

Browse files
authored
fix: custom comfy-api-base works with subpath (Comfy-Org#8332)
1 parent df1aebe commit 6c319cb

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

comfy_api_nodes/apis/client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,9 @@ def request(
327327
ApiServerError: If the API server is unreachable but internet is working
328328
Exception: For other request failures
329329
"""
330-
url = urljoin(self.base_url, path)
330+
# Use urljoin but ensure path is relative to avoid absolute path behavior
331+
relative_path = path.lstrip('/')
332+
url = urljoin(self.base_url, relative_path)
331333
self.check_auth(self.auth_token, self.comfy_api_key)
332334
# Combine default headers with any provided headers
333335
request_headers = self.get_headers()

0 commit comments

Comments
 (0)