open-webui/src/lib/components/chat/FileNav
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
..
BulkActionBar.svelte refac 2026-03-24 05:34:36 -05:00
CellEditor.svelte refac 2026-03-06 20:12:37 -06:00
FileCodeEditor.svelte feat: use CodeMirror for always-editable code file preview 2026-03-06 15:03:23 -06:00
FileEntryRow.svelte refac 2026-05-09 05:27:47 +09:00
FileNavToolbar.svelte refac 2026-05-09 05:27:47 +09:00
FilePreview.svelte feat: add IFRAME_CSP env var for srcdoc iframe content security policy 2026-05-11 01:56:02 +09:00
JsonTreeView.svelte refac 2026-03-06 20:12:37 -06:00
NotebookView.svelte refac 2026-03-06 20:12:37 -06:00
PortList.svelte refac 2026-03-23 21:14:22 -05:00
PortPreview.svelte refac 2026-03-24 05:48:43 -05:00
SqliteView.svelte refac 2026-03-06 20:12:37 -06:00