def get_cookie_domain(request):
    if 'HTTP_HOST' in request.META:
        host = request.META['HTTP_HOST']
        if 'hub3d.pvh.com' in host:
            cookie_domain = '.hub3d.pvh.com'
        elif 'stitch.fashion' in host:
            cookie_domain = '.stitch.fashion'
        elif 'stitch3d.com' in host:
            cookie_domain = '.stitch3d.com'
        else:
            cookie_domain = '.stitchdesignlab.com'
        return cookie_domain
    else:
        return '.stitchdesignlab.com'

def get_assets_v2_domain(request):
    return '*' + get_cookie_domain(request)
