Revert "Removing xhr insecurity"

This reverts commit 4e2938b15c5ea8d7fc32b19a1b97993debc35232.