'Set the cross-domain CSRF cookie.'

def process_response(self, request, response):

    if (not is_cross_domain_request_allowed(request)):
        log.debug('Could    not    set    cross-domain    CSRF    cookie.')
        return response
    should_set_cookie = (request.META.get('CROSS_DOMAIN_CSRF_COOKIE_USED', False) and request.META.get('CSRF_COOKIE_USED', False) and (request.META.get('CSRF_COOKIE') is not None))
    if should_set_cookie:
        response.set_cookie(settings.CROSS_DOMAIN_CSRF_COOKIE_NAME, request.META['CSRF_COOKIE'], max_age=settings.CSRF_COOKIE_AGE, domain=settings.CROSS_DOMAIN_CSRF_COOKIE_DOMAIN, path=settings.CSRF_COOKIE_PATH, secure=True)
        log.debug("Set    cross-domain    CSRF    cookie    '%s'    for    domain    '%s'", settings.CROSS_DOMAIN_CSRF_COOKIE_NAME, settings.CROSS_DOMAIN_CSRF_COOKIE_DOMAIN)
    return response
