set crossOrigin based on a flag instead of witty code