mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-22 09:31:58 -05:00
[GH-ISSUE #23755] issue: Openwebui ignores AIOHTTP_CLIENT_SESSION_SSL for image generation #35591
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @orKL3mlz on GitHub (Apr 15, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/23755
Check Existing Issues
Installation Method
Docker
Open WebUI Version
open-webui/open-webui:git-1860874-slim
Ollama Version (if applicable)
0.20.3
Operating System
Debian 13
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
Openwebui should ignore self signed certificate errors if
AIOHTTP_CLIENT_SESSION_SSL = Falsewhen making calls to the image generation endpoint.Actual Behavior
The request fails with an
Self signed certificateerror, in this case, when connecting to a comfyui instanceSteps to Reproduce
Configure Openwebui to use a Comfyui endpoint inside the image generation settings. If this endpoint uses a self-signed certificate, the request will fail with the error mentionned above.
Logs & Screenshots
Additional Information
I'm using the
devbranch to check if the issue has been fixed, but it's not for this use case, or the issue #23672@xyaz1313 commented on GitHub (Apr 15, 2026):
分析
问题根因:
comfyui.py使用了三种HTTP/WebSocket客户端,但都没有检查AIOHTTP_CLIENT_SESSION_SSL环境变量:websocket-client(第177、256行) —ws.connect()默认启用SSL验证,不支持自签名证书urllib.request(第30、45、63行) —urlopen()默认启用SSL验证aiohttp(第108行comfyui_upload_image) — 创建ClientSession时没有传ssl参数项目其他模块(如
routers/openai.py)已经正确使用了AIOHTTP_CLIENT_SESSION_SSL变量,但comfyui.py遗漏了。修复方案
修改
backend/open_webui/utils/images/comfyui.py:queue_prompturlopen(req)urlopen(req, context=ssl_ctx)get_imageurlopen(req)urlopen(req, context=ssl_ctx)get_historyurlopen(req)urlopen(req, context=ssl_ctx)comfyui_create_imagews.connect(...)ws.connect(..., sslopt=sslopt)comfyui_edit_imagews.connect(...)ws.connect(..., sslopt=sslopt)comfyui_upload_imagesession.post(url, ...)session.post(url, ..., ssl=AIOHTTP_CLIENT_SESSION_SSL)这样当用户设置
AIOHTTP_CLIENT_SESSION_SSL=False时,所有ComfyUI相关的连接都会跳过SSL证书验证,兼容自签名证书环境。@tjbck commented on GitHub (Apr 15, 2026):
Should be addressed in dev.