mirror of
https://github.com/open-webui/open-webui.git
synced 2026-06-03 07:24:59 -05:00
[GH-ISSUE #20604] issue: Missing Access-Control-Allow-Origin on users Direct Connections - Verification or loading models fails on GpuStack #89974
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 @axelhahn on GitHub (Jan 12, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/20604
Check Existing Issues
Installation Method
Docker
Open WebUI Version
0.72
Ollama Version (if applicable)
No response
Operating System
Manjaro
Browser (if applicable)
Firefox 146
Confirmation
README.md.Expected Behavior
I setup CORS_ALLOW_ORIGIN to access GpuStack:
CORS_ALLOW_ORIGIN=http://localhost:3000;http://127.0.0.1:3000;https://gpustack.example.comAdding the connection in admin setup works.
I expect that it works as a connection in the user setup as well.
Actual Behavior
If I setup a connection to a GpuStack instance (OpenAI compatible) in the user settings then the verification button fails "OpenAI: Network Problem".
On the page for connections is a notice
Connect to your own OpenAI compatible API endpoints.
CORS must be properly configured by the provider to allow requests from Open WebUI.
The CORS_ALLOW_ORIGIN is not applied here - but it is applied when adding the connection as admin.
Steps to Reproduce
docker-compouse up"POST /openai/verify HTTP/1.1" 200Logs & Screenshots
This works:
The OpenAI connection setup in admin panel makes a connection via openWebUI and respects CORS_ALLOW_ORIGIN value
open-webui | 2026-01-12 12:02:01.064 | INFO | uvicorn.protocols.http.httptools_impl:send:483 - 192.168.16.1:53480 - "POST /openai/verify HTTP/1.1" 200This doesn't
The Direct Connection in the user setup ignors CORS_ALLOW_ORIGIN.
When pressing verify:
The browser console shows
The failed OPTIONS request is the result of
HTTP/1.1 405 Method Not AllowedReason is the missing
Access-Control-Allow-Originin the request header.I can reproduced the behavior with a curl command
When adding the request header "Access-Control-Allow-Origin":
--> this works.
The connection can be saved even if the verification failed.
When going back to the home page the models won't be loaded because of the same problem (that can be seen as 405 error in the console).
The header "Access-Control-Allow-Origin:" must be added for Direct connections for Verify option and loading the models like it is handled when adding the connection globally via admin panel. Then OpenWebUI can be used by multiple users using their individual API key.
Additional Information
No response
@tjbck commented on GitHub (Jan 12, 2026):
Provider should support CORS.