From 8ab693d74de2cb67fdb0fdfb1bdde19c40992550 Mon Sep 17 00:00:00 2001 From: Jono M Date: Mon, 11 Dec 2023 14:01:53 +0000 Subject: [PATCH] Fixed wrong credentials usage in AdminX previews (#19281) refs PROD-227 --- .../site/announcementBar/AnnouncementBarPreview.tsx | 8 ++++---- .../settings/site/designAndBranding/ThemePreview.tsx | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/admin-x-settings/src/components/settings/site/announcementBar/AnnouncementBarPreview.tsx b/apps/admin-x-settings/src/components/settings/site/announcementBar/AnnouncementBarPreview.tsx index 209504af9b..6bd8ae2737 100644 --- a/apps/admin-x-settings/src/components/settings/site/announcementBar/AnnouncementBarPreview.tsx +++ b/apps/admin-x-settings/src/components/settings/site/announcementBar/AnnouncementBarPreview.tsx @@ -36,10 +36,10 @@ const AnnouncementBarPreview: React.FC = ({announcement announcementContent, visibilityMemo ), - Accept: 'text/plain', - mode: 'cors', - credentials: 'include' - } + Accept: 'text/plain' + }, + mode: 'cors', + credentials: 'include' }) .then(response => response.text()) .then((data) => { diff --git a/apps/admin-x-settings/src/components/settings/site/designAndBranding/ThemePreview.tsx b/apps/admin-x-settings/src/components/settings/site/designAndBranding/ThemePreview.tsx index 4fe2b49b0d..ce155836b4 100644 --- a/apps/admin-x-settings/src/components/settings/site/designAndBranding/ThemePreview.tsx +++ b/apps/admin-x-settings/src/components/settings/site/designAndBranding/ThemePreview.tsx @@ -69,10 +69,10 @@ const ThemePreview: React.FC = ({settings,url}) => { headers: { 'Content-Type': 'text/html;charset=utf-8', 'x-ghost-preview': previewData, - Accept: 'text/plain', - mode: 'cors', - credentials: 'include' - } + Accept: 'text/plain' + }, + mode: 'cors', + credentials: 'include' }) .then(response => response.text()) .then((data) => {