mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 19:38:46 -05:00
[PR #15892] [CLOSED] chore: fix development setup shows "unsupported method (frontend only)" error due to CORS misconfiguration #62831
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/15892
Author: @zetavg
Created: 7/20/2025
Status: ❌ Closed
Base:
dev← Head:fix-dev-cors📝 Commits (1)
a95ca07fix: Remove trailing slash from CORS_ALLOW_ORIGIN in dev.sh📊 Changes
1 file changed (+1 additions, -1 deletions)
View changed files
📝
backend/dev.sh(+1 -1)📄 Description
Problem
When running
backend/dev.sh+npm run dev, developers encounter:only). Please serve the WebUI from the backend."
http://localhost:8080/api/configRoot Cause
The
CORS_ALLOW_ORIGINinbackend/dev.shseems to have a trailing slash that doesn't match browser requests:http://localhost:5173/(with slash)http://localhost:5173(no slash)This mismatch causes CORS rejection, preventing the frontend from fetching APIs.
Solution
Remove the trailing slash from
CORS_ALLOW_ORIGINto match browser behavior.I'm not entirely sure I understand everything correctly though. Maybe I've done something wrong that has led to this issue.
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
Added
Changed
Deprecated
Removed
Fixed
Security
Breaking Changes
Additional Information
Screenshots or Videos
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.