From e4d21893e7bf38cd74548bda7badc35c1b0268e8 Mon Sep 17 00:00:00 2001 From: nonoqing Date: Fri, 28 Aug 2026 18:42:12 +0800 Subject: [PATCH] fix(miniapp): allow strict runtime downloads --- .../src/app/scenes/miniapps/components/MiniAppRunner.test.tsx | 2 +- src/web-ui/src/app/scenes/miniapps/components/MiniAppRunner.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/web-ui/src/app/scenes/miniapps/components/MiniAppRunner.test.tsx b/src/web-ui/src/app/scenes/miniapps/components/MiniAppRunner.test.tsx index 1321f3c19e..dda0c4f408 100644 --- a/src/web-ui/src/app/scenes/miniapps/components/MiniAppRunner.test.tsx +++ b/src/web-ui/src/app/scenes/miniapps/components/MiniAppRunner.test.tsx @@ -83,7 +83,7 @@ describe('MiniAppRunner strict bridge startup', () => { expect(createObjectURL.mock.calls[0][0]).toBeInstanceOf(Blob); expect(iframe.getAttribute('src')).toBe('blob:market-lens-1'); expect(iframe.getAttribute('srcdoc')).toBeNull(); - expect(iframe.getAttribute('sandbox')).toBe('allow-scripts'); + expect(iframe.getAttribute('sandbox')).toBe('allow-scripts allow-downloads'); const updatedApp = { ...app, diff --git a/src/web-ui/src/app/scenes/miniapps/components/MiniAppRunner.tsx b/src/web-ui/src/app/scenes/miniapps/components/MiniAppRunner.tsx index 7dd855d207..e3329b7b8e 100644 --- a/src/web-ui/src/app/scenes/miniapps/components/MiniAppRunner.tsx +++ b/src/web-ui/src/app/scenes/miniapps/components/MiniAppRunner.tsx @@ -98,7 +98,7 @@ const MiniAppRunner: React.FC = ({ app, runScope, strictRunt data-app-id={app.id} data-run-scope={runScope?.kind ?? 'active'} data-runtime-profile="market-strict" - sandbox="allow-scripts" + sandbox="allow-scripts allow-downloads" referrerPolicy="no-referrer" style={{ flex: '1 1 auto', width: '100%', minHeight: 0, border: 'none', display: 'block' }} title={app.name}