Skip to content

feat: ComfyUI ?????? https://domain:port ????? - #119

Open
lonrencn wants to merge 1 commit into
hero8152:mainfrom
lonrencn:feat/comfyui-https-support
Open

feat: ComfyUI ?????? https://domain:port ?????#119
lonrencn wants to merge 1 commit into
hero8152:mainfrom
lonrencn:feat/comfyui-https-support

Conversation

@lonrencn

Copy link
Copy Markdown

??

?? ComfyUI ????????? host:port ??(? 127.0.0.1:8188),??????? http(s):// ??,??? 13 ? ComfyUI ?????? http://{addr},??????????(?????????? https://domain:8188)?

??

?? comfy_base_url(addr) ????:

  • ??????(http:// / https://)? ??,?????
  • ?????(host:port)? ?? http://,?????????

?? main.py

  • ?? comfy_base_url() ????
  • save_comfyui_instances ?????? http(s):// ??(????),?????????
  • 13 ? f"http://{addr}/..." ???? f"{comfy_base_url(addr)}/..."

??

  • static/comfyui-settings.html:?????? https://domain:port ??
  • static/js/comfyui-settings.js:input placeholder ????

???

  • ??? host:port ????????(??? http)
  • ????????(? scheme)???
  • ????(????)??????

??

  • python -c "import ast; ast.parse(...)" ??????
  • comfy_base_url ??????(http ?? / https ?? / ??????)
  • ??????:PUT /api/comfyui/instances ?? https://example.com:8443 ????????;??????????? 400

原实现强制剥离 http(s):// 前缀且所有请求硬编码 http://,无法连接远程加密后端。
新增 comfy_base_url() 辅助函数:完整地址(含协议)直连不额外拼接,无协议的 host:port 默认 http://(老用户逻辑完全不变)。
改动覆盖后端 13 处 ComfyUI 请求拼接与保存校验,并更新前端提示文案。

- main.py: 新增 comfy_base_url();save_comfyui_instances 保留 scheme;13 处 http://{addr} 改用 comfy_base_url(addr)
- static/comfyui-settings.html: 提示补充 https://domain:port 用法
- static/js/comfyui-settings.js: placeholder 同步更新
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants