fix: validate event origin from allowedOrigins in loop
This commit is contained in:
parent
1cc4cc7f21
commit
aac5e12d17
|
@ -8,11 +8,9 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
const sendPostMessage = message => {
|
const sendPostMessage = message => {
|
||||||
allowedOrigins.forEach(origin => {
|
if (allowedOrigins.includes(location.origin)) {
|
||||||
if (origin === location.origin) {
|
window.postMessage(message, location.origin);
|
||||||
window.postMessage(message, origin);
|
}
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const askHandshake = () => {
|
const askHandshake = () => {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user