adding conditional to prevent embedprovider handler firing

This commit is contained in:
Martin McKeaveney 2024-08-28 16:56:51 +01:00
parent 8e40e98b6a
commit 8c769140bb
1 changed files with 4 additions and 0 deletions

View File

@ -12,6 +12,10 @@
}
function handleMessage(event) {
if (event.data?.type !== "bb-parent-window-event") {
return
}
// Validate the event origin to ensure it's coming from a trusted source
// Allow different subdomains but must match TLD
const appOrigin = extractDomainFromUrl(window.location.origin)