mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[GH-ISSUE #23048] issue: Terminal server "Verify Connection" calls external server directly from browser instead of proxying through backend #35402
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 @westbrook-ai on GitHub (Mar 26, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/23048
Check Existing Issues
Installation Method
Docker
Open WebUI Version
0.8.10
Ollama Version (if applicable)
No response
Operating System
MacOS
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
When clicking the "Verify Connection" button in the Add Terminal Server modal, the verification request should be proxied through the Open WebUI backend (similar to how OpenAI and Ollama connection verification works via
POST /api/v1/openai/verifyandPOST /api/v1/ollama/verify). The terminal server API key should never leave the backend.Actual Behavior
The frontend calls the terminal server URL directly from the browser (
fetch(\${baseUrl}/api/v1/policies\) andfetch(\${baseUrl}/api/config\), sending the API key in theAuthorizationheader directly from the client. This has three problems:API key exposure: The terminal server API key is sent from the browser to the terminal server, rather than being kept server-side. For OpenAI/Ollama connections, the key is sent to the Open WebUI backend which proxies the verification, keeping the key out of the browser's network traffic to external services.
CORS failures: When the terminal server is an in-cluster Kubernetes service (ClusterIP), the browser cannot reach it at all. Even when reachable, the terminal server may not have CORS headers configured for the Open WebUI origin, causing the fetch to fail.
Inconsistency: The
putOrchestratorPolicyfunction in the same file (src/lib/apis/configs/index.ts) also makes direct calls to the terminal server from the browser, same issue.Steps to Reproduce
devbranch via Git Clone.http://terminal-orchestrator:8080) and an API key.GETrequest tohttp://terminal-orchestrator:8080/api/v1/policieswith the API key in theAuthorizationheader. This request originates from the browser, not from the Open WebUI backend.Logs & Screenshots
Example screenshot of Network tab when clicking Verify Connection:
Additional Information
No response
@Arokha commented on GitHub (Mar 26, 2026):
NB: This is a shared modal, the same one used for adding user-specific from-browser OT connections as used in the admin panel to add system-wide OT connections. So care should be taken to not break the other one, since, the user-specific from-browser OT connections (set up in your own user settings modal) SHOULD be doing it this way.
@Classic298 commented on GitHub (Mar 26, 2026):
a641325707@tjbck commented on GitHub (Mar 26, 2026):
Addressed.