[GH-ISSUE #13231] issue: CORS issue with static file #16856

Closed
opened 2026-04-19 22:41:24 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @zhangzunke on GitHub (Apr 26, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/13231

Check Existing Issues

  • I have searched the existing issues and discussions.
  • I am using the latest version of Open WebUI.

Installation Method

Git Clone

Open WebUI Version

0.6.5

Ollama Version (if applicable)

No response

Operating System

Ubuntu 24.04.1 LTS in window sub system

Browser (if applicable)

No response

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have listed steps to reproduce the bug in detail.

Expected Behavior

The static file can be accessed by frontend site.

Actual Behavior

Currently, the static files were blocked by CORS

Image

Steps to Reproduce

1.Go to http://localhost:5173/
2.Open the inspect of page

Logs & Screenshots

Image

Additional Information

I know someone has fixed this issue, could pls merge the code into the main branch since I am not only one who has encountered this issue.

https://github.com/open-webui/open-webui/pull/7458

Originally created by @zhangzunke on GitHub (Apr 26, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/13231 ### Check Existing Issues - [x] I have searched the existing issues and discussions. - [x] I am using the latest version of Open WebUI. ### Installation Method Git Clone ### Open WebUI Version 0.6.5 ### Ollama Version (if applicable) _No response_ ### Operating System Ubuntu 24.04.1 LTS in window sub system ### Browser (if applicable) _No response_ ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have listed steps to reproduce the bug in detail. ### Expected Behavior The static file can be accessed by frontend site. ### Actual Behavior Currently, the static files were blocked by CORS ![Image](https://github.com/user-attachments/assets/17fd5379-f8d7-4356-96af-facb1336ab12) ### Steps to Reproduce 1.Go to http://localhost:5173/ 2.Open the inspect of page ### Logs & Screenshots ![Image](https://github.com/user-attachments/assets/557eea15-838c-447e-9db2-1d7cc58a307d) ### Additional Information I know someone has fixed this issue, could pls merge the code into the main branch since I am not only one who has encountered this issue. https://github.com/open-webui/open-webui/pull/7458
GiteaMirror added the bug label 2026-04-19 22:41:24 -05:00
Author
Owner

@athoik commented on GitHub (Apr 26, 2025):

Hi,

You will not have the issue if you serve everything from the backend.

Step 1. Build the frontend (it will create a build folder)

cd open-webui
npm install
NODE_OPTIONS="--max-old-space-size=8192" npm run build

Step 2. Build backend

cd backend
conda activate open-webui
pip install -r requirements.txt -U
sh dev.sh

Step 3. Use port http://localhost:8080 (instead of 5173)

Now everthing will served using port 8080, so you will get no CORS errors.

<!-- gh-comment-id:2831918081 --> @athoik commented on GitHub (Apr 26, 2025): Hi, You will not have the issue if you serve everything from the backend. Step 1. Build the frontend (it will create a build folder) ``` cd open-webui npm install NODE_OPTIONS="--max-old-space-size=8192" npm run build ``` Step 2. Build backend ``` cd backend conda activate open-webui pip install -r requirements.txt -U sh dev.sh ``` Step 3. Use port http://localhost:8080 (instead of 5173) Now everthing will served using port 8080, so you will get no CORS errors.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#16856