From 6f0adc42edda1110232b34ad6485cb6f84a5196d Mon Sep 17 00:00:00 2001 From: bgharbi Date: Thu, 26 Oct 2023 15:07:32 +0200 Subject: [PATCH] add whitelist callback --- workspaces/netlify-cms-auth/src/callback.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/workspaces/netlify-cms-auth/src/callback.ts b/workspaces/netlify-cms-auth/src/callback.ts index ae3964983e..8d52ba6b13 100644 --- a/workspaces/netlify-cms-auth/src/callback.ts +++ b/workspaces/netlify-cms-auth/src/callback.ts @@ -65,7 +65,8 @@ function postMessageHTML({ status, data, env }: PostMessageHTMLArgs) { const allowedOrigin = ( message.origin === 'http://localhost:1234' || message.origin === 'http://127.0.0.1:1234' || - /^https:\\/\\/[-_\\w]+\\.starknet-netlify-cms\\.pages\\.dev$/.test(message.origin) || + /^https:\\/\\/[-_\\w]+\\.starknet-netlify-cms\\.pages\\.dev$/.test(message.origin) || + /^https:\\/\\/[-_\\w]+\\.starknet-netlify-cms-byd\\.pages\\.dev$/.test(message.origin) || message.origin === '${env.CMS_URL}' );