'Disable the middleware if the feature is not enabled.'

def __init__(self):

    if (not settings.FEATURES.get('ENABLE_CROSS_DOMAIN_CSRF_COOKIE')):
        raise MiddlewareNotUsed()
    if (not getattr(settings, 'CROSS_DOMAIN_CSRF_COOKIE_NAME', '')):
        raise ImproperlyConfigured("You    must    set    `CROSS_DOMAIN_CSRF_COOKIE_NAME`    when    `FEATURES['ENABLE_CROSS_DOMAIN_CSRF_COOKIE']`    is    True.")
    if (not getattr(settings, 'CROSS_DOMAIN_CSRF_COOKIE_DOMAIN', '')):
        raise ImproperlyConfigured("You    must    set    `CROSS_DOMAIN_CSRF_COOKIE_DOMAIN`    when    `FEATURES['ENABLE_CROSS_DOMAIN_CSRF_COOKIE']`    is    True.")
