Skip to content

Commit

Permalink
Add ability to test and initiate overlay from the customer site directly
Browse files Browse the repository at this point in the history
  • Loading branch information
hthr-lee committed Aug 23, 2024
1 parent 92426f9 commit 908dd56
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/experiment-tag/src/messenger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ export class WindowMessenger {
}>,
) => {
const match = /^.*\.amplitude\.com$/;
if (!match.test(new URL(e.origin).hostname)) {
if (
!match.test(new URL(e.origin).hostname) &&
new URL(window.origin).hostname !== new URL(e.origin).hostname
) {
return;
}
if (e.data.type === 'OpenOverlay') {
Expand Down

0 comments on commit 908dd56

Please sign in to comment.