open-webui/backend
Classic298 d8133c905a
fix: serve module scripts and wasm assets with the correct MIME type (#29139)
On Windows hosts the built-in code interpreter fails immediately with "Failed to fetch dynamically imported module: .../pyodide/pyodide.asm.mjs", and the browser console shows the server answered with a MIME type of "text/plain". Code execution is unusable for those users.

Python's mimetypes module reads the Windows registry after loading its own table, so a stray registry entry silently replaces the correct type for an extension and Starlette then labels the file with it. Browsers enforce strict MIME checking for module scripts and streaming WASM compilation, so the pyodide loader gets refused. The same workaround already existed for .js; this extends it to the two other extensions pyodide ships, and moves it out of the frontend-build branch so the unconditionally mounted /static assets are covered as well.

Fixes #29133
2026-08-30 21:32:31 -04:00
..
data refac: mv backend files to /open_webui dir 2024-09-04 16:54:48 +02:00
open_webui fix: serve module scripts and wasm assets with the correct MIME type (#29139) 2026-08-30 21:32:31 -04:00
.dockerignore fix: litellm config issue 2024-02-24 22:35:11 -08:00
.gitignore refac 2024-09-06 04:59:20 +02:00
dev.sh perf: allow disabling websocket per-message-deflate (#28613) 2026-08-24 18:46:07 -04:00
requirements-min.txt perf: optional orjson JSON codec behind ENABLE_ORJSON (#27583) 2026-07-27 03:45:37 -04:00
requirements.txt chore: python-docx dep 2026-08-25 11:59:37 -04:00
start.sh perf: allow disabling websocket per-message-deflate (#28613) 2026-08-24 18:46:07 -04:00
start_windows.bat perf: allow disabling websocket per-message-deflate (#28613) 2026-08-24 18:46:07 -04:00