View Full Version : [CLOSED] MessageBus thru iFrame via hosted Domain

Dec 15, 2013, 4:30 PM
hi : We have the MessageBus working well - IF - everything is hosted under one domain.
For Example : http://www.Child.com - works great - if all MessageBus code runs under this one domain.
We have error when, for example, there is a hosted service on a different domain:
For Example, below: Parent.com , hosts Child.com via iFrame:
-- http://www.Child.com

In example above, when the URL we see in address bar = http://www.Parent.com, then the MessageBus running on the Child.com code fails.
I hope this makes sense: Essentially, we need a way to use MessageBus, when the Domain URL (in the address bar) i.e. Domain of parent, is different than domain of Child in iFrame where MessageBus is running.

Dec 15, 2013, 4:49 PM
It is browser security restriction is called "same origin policy" (see http://en.wikipedia.org/wiki/Same-origin_policy)
You can try to add "Access-Control-Allow-Origin" header to the required appilcation (or for particular page only) to deactivate that security mode (not sure if it will work always)
Please see http://stackoverflow.com/a/18219077/1475939

Links which can be interesting for you