Send window.loation.origin in `channelOpen`
It's possible for the cache to redirect. If that happens, an AMP Viewer won't know what target origin to send messages to. The channelOpen request should include the origin so that the messaging channel can be established. This will be an issue with per publisher cache subdomains.
/cc @chenshay
/to @muxin
See internal issue b/34466538 for more context.
I don't understand why we should send it. The incoming message definitely comes with an origin tag (that should be the same value). You need to check event.origin.endsWith('.cdn.ampproject.org').
Good point. That should be fine.