Simplify code by using global cross_domain_check