diff --git a/src/lib/components/chat/FileNav/PortPreview.svelte b/src/lib/components/chat/FileNav/PortPreview.svelte index f4c184af99..fc7076db58 100644 --- a/src/lib/components/chat/FileNav/PortPreview.svelte +++ b/src/lib/components/chat/FileNav/PortPreview.svelte @@ -269,7 +269,7 @@ src={proxyUrl} title="Port {port} preview" class="w-full h-full border-0 bg-white" - sandbox="allow-scripts{($settings?.terminalPreviewAllowSameOrigin ?? true) + sandbox="allow-scripts{($settings?.terminalPreviewAllowSameOrigin ?? false) ? ' allow-same-origin' : ''} allow-forms allow-popups allow-modals allow-downloads" on:load={onIframeLoad} diff --git a/src/lib/components/common/InterfaceSettings.svelte b/src/lib/components/common/InterfaceSettings.svelte index 8471aa85c4..e32672aa86 100644 --- a/src/lib/components/common/InterfaceSettings.svelte +++ b/src/lib/components/common/InterfaceSettings.svelte @@ -109,7 +109,7 @@ let iframeSandboxAllowSameOrigin = false; let iframeSandboxAllowForms = true; let iframeSandboxAllowDownloads = true; - let terminalPreviewAllowSameOrigin = true; + let terminalPreviewAllowSameOrigin = false; let showManageFloatingActionButtonsModal = false; let showManageImageCompressionModal = false; @@ -311,7 +311,7 @@ iframeSandboxAllowSameOrigin = currentSettings?.iframeSandboxAllowSameOrigin ?? false; iframeSandboxAllowForms = currentSettings?.iframeSandboxAllowForms ?? true; iframeSandboxAllowDownloads = currentSettings?.iframeSandboxAllowDownloads ?? true; - terminalPreviewAllowSameOrigin = currentSettings?.terminalPreviewAllowSameOrigin ?? true; + terminalPreviewAllowSameOrigin = currentSettings?.terminalPreviewAllowSameOrigin ?? false; stylizedPdfExport = currentSettings?.stylizedPdfExport ?? true;