fix: keep the admin status page preview iframe same-origin

The preview framed the page public URL, which for a custom domain is cross
origin and blocked by the admin document CSP frame-src. Point the iframe at the
same-origin public path while the frame chrome still shows the public URL.
This commit is contained in:
Buco7854 committed 2026-06-24 18:21:40 +00:00
1 parent ea23610b3a
commit 52b95ad121
2 files changed
+13 -1

No files matched your search

+3 -1
View File
@@ -17,6 +17,7 @@ import {
} from "@/Types/StatusPage";
import {
buildStatusPageApiPath,
getStatusPagePreviewUrl,
getStatusPagePublicUrl,
isCustomDomainHost,
} from "@/Utils/statusPageUrl";
@@ -142,6 +143,7 @@ const StatusPageView = () => {
}
const publicUrl = getStatusPagePublicUrl(statusPage);
const previewUrl = getStatusPagePreviewUrl(statusPage);
return (
<BasePage
loading={isLoading}
@@ -163,7 +165,7 @@ const StatusPageView = () => {
<BrowserFrame url={publicUrl}>
<Box
component="iframe"
src={publicUrl}
src={previewUrl}
title={t("pages.statusPages.preview.title")}
flex={1}
width="100%"