fix(pipes): inject explicit sandbox policies to artifacts iframe to mitigate client-side block

This commit is contained in:
fujie
2026-02-28 12:57:22 +08:00
parent acc9cd7ff2
commit 8e8d478ece

View File

@@ -1228,6 +1228,8 @@ class Pipe:
# Artifacts mode: standard iframe for the AI to output directly (Infinite height)
iframe_html = (
f'<iframe src="{view_url}" '
f'sandbox="allow-scripts allow-same-origin allow-popups allow-downloads allow-forms" '
f'allow="fullscreen" '
f'style="width:100%; height:100vh; min-height:600px; border:none; border-radius:12px; '
f'box-shadow: 0 10px 40px rgba(0,0,0,0.1);"></iframe>'
)