Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

源码中this.target.postMessage(..., '*') ,此处的*为什么不替换成target的origin域名 #41

Open
mybraveheart opened this issue May 27, 2020 · 0 comments

Comments

@mybraveheart
Copy link

mybraveheart commented May 27, 2020

平时不用postMessage,主要考虑到的是postMessage发送到其他域信息如果被存储下来,其他页可以onmessage全盘接收保存,不太安全,是否可以在发送一次消息后,获取当前域名,下次发送时,直接指定域名呢,毕竟指定了iframe的名称,通过名称map映射到对应的origin,存储origin再返回给发送发,下次发送时自动带上?更或者初始化target时,自动就做一下origin映射,是否可以?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant