GPII-947: Replace url origin with location.origin.