Generate the origin from an URL or check if two URL/Origins are the same