From 566b45fdd492f0c3c9f0086776ebee56a670bd37 Mon Sep 17 00:00:00 2001 From: Brandon Date: Mon, 24 Nov 2025 13:57:23 -0500 Subject: [PATCH 1/2] add local network access --- src/iframe/iframe.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/iframe/iframe.ts b/src/iframe/iframe.ts index 3de8f9b..b3771a6 100644 --- a/src/iframe/iframe.ts +++ b/src/iframe/iframe.ts @@ -6,8 +6,10 @@ const createIframe = (src: string): HTMLElement => { iframe.style.setProperty("height", "100%"); iframe.style.setProperty("border", "none"); iframe.allow = "clipboard-write"; + iframe.allow = "local-network-access" iframe.src = src; + return wrapWithLoader(iframe); }; From 829156ba09524da0395a34c556d9fd68c41e36f5 Mon Sep 17 00:00:00 2001 From: Brandon Date: Tue, 9 Dec 2025 10:42:27 -0500 Subject: [PATCH 2/2] feat(iframe) Add permissions for local network access --- src/iframe/iframe.spec.ts | 5 +++-- src/iframe/iframe.ts | 5 ++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/iframe/iframe.spec.ts b/src/iframe/iframe.spec.ts index 0a75bb1..03f18e8 100644 --- a/src/iframe/iframe.spec.ts +++ b/src/iframe/iframe.spec.ts @@ -29,10 +29,11 @@ describe("iframe util", () => { }); }); - it("returns an iframe with the allow attribute set to clipboard-read and clipboard-write", () => { + it("returns an iframe with the allow attribute set to clipboard-read, clipboard-write, and local-network-access", () => { return import("./iframe").then(({ createIframe }) => { const iframe = createIframe(mockSrc) as HTMLIFrameElement; - expect(iframe.allow).toEqual("clipboard-write"); + expect(iframe.allow).toContain("clipboard-write"); + expect(iframe.allow).toContain("local-network-access"); }); }); }); diff --git a/src/iframe/iframe.ts b/src/iframe/iframe.ts index b3771a6..9113b44 100644 --- a/src/iframe/iframe.ts +++ b/src/iframe/iframe.ts @@ -5,10 +5,9 @@ const createIframe = (src: string): HTMLElement => { iframe.style.setProperty("width", "100%"); iframe.style.setProperty("height", "100%"); iframe.style.setProperty("border", "none"); - iframe.allow = "clipboard-write"; - iframe.allow = "local-network-access" - iframe.src = src; + iframe.allow = "clipboard-write; local-network-access"; + iframe.src = src; return wrapWithLoader(iframe); };