From 89e6768e8556ceea9a67cd23111610767ca3845d Mon Sep 17 00:00:00 2001 From: Martin Turoci Date: Mon, 28 Aug 2023 13:33:57 +0200 Subject: [PATCH] fix: Cache iframe ObjectURL. Closes #1629 --- ui/src/frame.tsx | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/ui/src/frame.tsx b/ui/src/frame.tsx index 1b6a8f2252..3053132262 100644 --- a/ui/src/frame.tsx +++ b/ui/src/frame.tsx @@ -95,9 +95,10 @@ const // replace ' src="/' -> ' src="http://foo.bar.baz:8080/' fixrefs = (s: S): S => s.replace(/(\s+src\s*=\s*["'])\//g, `$1${window.location.protocol}//${window.location.host}/`), inline = (s: S): S => URL.createObjectURL(new Blob([fixrefs(s)], { type: 'text/html' })), - InlineFrame = ({ path, content }: { path?: S, content?: S }) => ( -