Files
open-webui/src/lib/components/common
Timothy Jaeryang Baek 3bba1c2270 feat: add IFRAME_CSP env var for srcdoc iframe content security policy
Adds an IFRAME_CSP environment variable that injects a Content-Security-Policy
<meta> tag into all srcdoc iframes rendering untrusted content:
- Artifacts (LLM-generated HTML previews)
- FullHeightIframe (tool/embed output)
- FilePreview (user-uploaded HTML files)
- CitationModal (RAG document HTML)

Shared utility in src/lib/utils/csp.ts handles injection with HTML-safe
attribute escaping. URL-based iframes (src=) are correctly excluded.

Env-var only — no PersistentConfig, no admin UI, no DB. Set once at deploy
time, requires restart. Empty string (default) means no CSP restriction.
2026-05-11 01:56:02 +09:00
..
2026-02-08 06:45:01 +04:00
2026-02-22 17:38:14 -06:00
2026-01-28 00:49:12 +04:00
2026-02-11 16:24:11 -06:00
2025-11-27 06:03:22 -05:00
2025-11-05 00:54:25 -05:00
2026-03-25 16:43:06 -05:00
2026-03-25 16:48:57 -05:00
2026-03-22 22:01:38 -05:00
2026-03-31 23:36:01 -05:00
2026-03-15 23:03:30 -05:00
2026-03-25 16:43:06 -05:00
2025-09-04 02:50:50 +04:00
2026-03-29 19:17:12 -05:00
2025-12-21 23:17:53 +04:00
2025-11-19 01:20:07 -05:00
2025-10-26 19:33:39 -07:00
2026-04-01 04:36:02 -05:00
2025-12-09 21:50:27 -05:00
2025-06-02 23:25:38 +04:00
2024-11-03 03:00:28 -08:00
2026-03-31 23:36:01 -05:00
2025-02-15 19:27:25 -08:00
2026-03-16 01:04:17 -05:00
2026-04-01 04:36:02 -05:00
2026-05-09 02:56:15 +09:00
2026-05-09 06:32:34 +09:00
2026-03-23 23:39:52 -05:00
2026-03-23 23:39:52 -05:00
2026-05-09 02:58:17 +09:00
2025-01-17 17:03:25 -08:00
2025-06-27 16:15:16 +04:00
2026-02-08 06:45:01 +04:00
2026-05-09 05:03:38 +09:00
2026-04-13 21:52:19 -05:00
2026-02-11 16:24:11 -06:00