-
Notifications
You must be signed in to change notification settings - Fork 65
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
Origin Use is Backwards? #34
Comments
Making progress on this... it seems Firefox temporarily places an |
OK, so the problem was indeed the intermediate iframe in Firefox (did not test on other browsers). What I had to do was a little ugly:
Will close this, but it would be useful for the library to cope with this situation. |
I have a page which loads an iframe from a user configured URL. In order to set up the channel between the page and the iframe, I initialize the channel each using the other's URL, after reducing it to protocol://domain/.
For example, page at http://localhost/a/b/c loads external website http://think.dolhub.com. So in the localhost page I use origin="http://think.dolhub.com" and in the external page on dolhub.com I use origin="http://localhost".
However, the request to build the channel throws:
Failed to execute ‘postMessage’ on ‘DOMWindow’: The target origin provided (‘http://think.dolhub.com’) does not match the recipient window’s origin (‘http://localhost’).
. However, the supplied origin most certainly does match the recipient's origin:This is backwards from my expectations, which is to supply the origin of the page I wish to communicate with at each respective end. Otherwise, where is the security?
The text was updated successfully, but these errors were encountered: