Revert "Removing support for cross-domain"

This reverts commit 3d7d8cbc6579453fce14b6d548cc54aef655013f.