mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[PR #22585] [CLOSED] fix: derive WebSocket protocol from window.location to fix wss:// on HTTPS deployments #42399
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?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/22585
Author: @NIK-TIGER-BILL
Created: 3/11/2026
Status: ❌ Closed
Base:
main← Head:fix/terminal-ws-protocol-https📝 Commits (1)
1a1829cfix: derive WebSocket protocol from window.location to fix wss:// on HTTPS📊 Changes
1 file changed (+10 additions, -2 deletions)
View changed files
📝
src/lib/components/chat/XTerminal.svelte(+10 -2)📄 Description
Problem
When Open WebUI is served over HTTPS but
WEBUI_API_BASE_URLcontains anhttp://URL (e.g. an internal Kubernetes service address),XTerminal.sveltederives the WebSocket protocol by replacing the scheme in the API base URL:Because
basestarts withhttp://, the replacement producesws://instead ofwss://, causing a mixed-content error and a connection failure in the terminal (fixes #22581).Fix
Use
window.location.protocolto determine the correct WebSocket protocol, which always reflects what the browser actually used to load the page:Applied to both the direct-connect and system (admin connect) terminal paths.
Fixes #22581
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.