mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-11 00:13:40 -05:00
[GH-ISSUE #9112] CORS error when requesting via Pyodide #15389
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 @talpa-robin on GitHub (Jan 30, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/9112
Bug Report
Installation Method
Docker via Kubernetes
Environment
Open WebUI Version: v0.5.4
Ollama (if applicable): 0.5.6-0-g2539f2d-dirty
Operating System: macOS 15.2
Browser (if applicable): Chrome 131.0.6778.205
Confirmation:
Expected Behavior:
When getting Python code from the LLM that is supposed to do external calls, like to https://www.google.com, Pyodide should be able to resolve the external resource.
Actual Behavior:
I'm getting CORS errors like
The Python stacktrace says
but I don't think that is important.
I guess the problem is, that the external requests doesn't include a "Origin" header and therefore doesn't get back CORS headers.
Description
Bug Summary:
Look at the actual behavior section
Reproduction Details
Steps to Reproduce:
Ask your LLM of choice to create Python script that calls https://www.google.com and prints the response. Then try to execute it within the conversion.