mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 03:18:23 -05:00
[GH-ISSUE #1538] CORS errors when loading manifest.json behind Cloudflare Access #28069
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 @cybersholt on GitHub (Apr 13, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/1538
Bug Report
Description
Bug Summary:
The manifest.json file fails to load when Open WebUI is deployed in a self-hosted environment with Cloudflare Access enabled.
Steps to Reproduce:
Expected Behavior:
The manifest.json should load successfully without any CORS issues, allowing for proper functionality of the web UI.
Actual Behavior:
The manifest.json file does not load as expected, likely due to a CORS error, resulting in a dysfunctional or partially loaded web UI.
Environment
Reproduction Details
Confirmation:
Logs and Screenshots
Browser Console Logs:
Manifest: Line: 1, column: 1, Syntax error.
Docker Container Logs:
N/A
Screenshots (if applicable):



Error 1:
Error 2:
Example Fix:
Installation Method
Docker
Additional Information
This bug is the same as: https://github.com/outline/outline/issues/1850 and only requires modifying the manifest link element to include the attribute crossorigin="use-credentials". This allows the manifest to be loaded with credentials such as cookies or authorization headers.
I was able to test the validity of this by modifying the code in /app/build/index.html from:
<link rel="manifest" href="manifest.json">to:
<link rel="manifest" href="manifest.json" crossorigin="use-credentials">@tjbck commented on GitHub (Apr 13, 2024):
Made the change in our dev branch, let us know if that fixes the issue. Thanks!
@cybersholt commented on GitHub (Apr 14, 2024):
@tjbck Thanks for the quick response and the fix, works great!
@oreeke commented on GitHub (Mar 12, 2025):
@tjbck The error is still there, why was the fix canceled?
@Classic298 commented on GitHub (Mar 17, 2025):
@oreeke as you can see, nobody reported this in almost a full year and it was fixed and the original poster of the issue confirmed it was fixed.
So it was fixed. Therefore, it was closed.
If you have a similar problem, it is more than probable it is due to misconfiguration on your side than open-webui.
If you have issues with CORS, try setting the CORS environment variable accordingly.
@themw123 commented on GitHub (Mar 17, 2025):
I am facing a similar issue: in browser console i am getting:
@Classic298 commented on GitHub (Mar 17, 2025):
looks like you did not set the CORS policy via environment variable.
@oreeke commented on GitHub (Mar 17, 2025):
@Classic298
Perhaps you are commenting without understanding the issue at all. And the problem isn't being reported further simply because there are fewer application scenarios.
The error log mentions CORS, but that's not the root cause.
Maybe you should use google or look at other similar issues in github.
This issue was fixed at one point, but for whatever reason it was canceled, which is what I'm asking about.
@oreeke commented on GitHub (Mar 17, 2025):
@themw123
It is possible to temporarily apply a bypass policy to manifest.json to ignore this issue.
@Classic298 commented on GitHub (Mar 17, 2025):
If that's the case, pardon
@oreeke commented on GitHub (Mar 17, 2025):
@Classic298
Not a big deal.
I was thinking they didn't use a fix like
<link rel="manifest" href="manifest.json" crossorigin="use-credentials">.Possibly due to other concerns, or a more elegant approach.
@themw123 commented on GitHub (Mar 18, 2025):
Fixed it by setting a bypass rule in cloudflare for my.domain.com/config.json
@oreeke commented on GitHub (Mar 18, 2025):
@themw123
Using the bypass rule for config.json is not secure; you can set only my.domain.com/manifest.json.
@oreeke commented on GitHub (Apr 13, 2025):
This issue was fixed in 0.6.3.