mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-09 10:50:35 -06:00
[GH-ISSUE #14181] issue: Default value for CORS_ALLOW_ORIGIN conflict with credentials settings in CORSMiddleware #55840
Reference in New Issue
Block a user
Originally created by @wtarit on GitHub (May 22, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/14181
Check Existing Issues
Installation Method
Git Clone
Open WebUI Version
v0.6.10
Ollama Version (if applicable)
No response
Operating System
Linux (WSL2, Ubuntu 24.04)
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
When launching Open WebUI for the first time it should go to the Welcome/Get Started page.
Actual Behavior
I got an error page with the error message
Open WebUI Backend Required.Steps to Reproduce
npm run devand backend withsh dev.sh.http://localhost:5173/Logs & Screenshots
Additional Information
It seems that by not setting
CORS_ALLOW_ORIGINenvironment variable, theCORS_ALLOW_ORIGINdefault to "*;http://localhost:5173;http://localhost:8080" (config.py#L1275)This is problematic because when
allow_credentials=Trueis set (main.py#L1009), the wildcard"*"is not allowed according to FastAPI's documentation. This creates a conflict in the CORS configuration, causing the CORS error.The default value for allow_origins shouldn't include wildcard to prevent conflict.
@GuilhermeCorsino21 commented on GitHub (May 23, 2025):
how to fix that? the same error here
@JovinLim commented on GitHub (Jun 7, 2025):
Go into open-webui/backend/open_webui/config.py and look for this:
Remove the first *; and it should work. I ran into the same problem and fixed it this way