mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-01 01:51:44 +00:00
Potential fix for pull request finding 'CodeQL / Incomplete URL substring sanitization'
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
parent
9835f57e9c
commit
528a13b37a
1 changed files with 3 additions and 2 deletions
|
|
@ -32,7 +32,7 @@ import uuid
|
|||
import copy
|
||||
import argparse
|
||||
from pathlib import Path
|
||||
from urllib.parse import urljoin, urlencode
|
||||
from urllib.parse import urljoin, urlencode, urlparse
|
||||
|
||||
try:
|
||||
import requests
|
||||
|
|
@ -82,7 +82,8 @@ class ComfyRunner:
|
|||
def __init__(self, host: str = "http://127.0.0.1:8188", api_key: str = None):
|
||||
self.host = host.rstrip("/")
|
||||
self.api_key = api_key
|
||||
self.is_cloud = "cloud.comfy.org" in self.host or api_key is not None
|
||||
parsed_host = urlparse(self.host).hostname or ""
|
||||
self.is_cloud = parsed_host.lower() == "cloud.comfy.org" or api_key is not None
|
||||
self.client_id = str(uuid.uuid4())
|
||||
|
||||
@property
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue