'Skip the usual CSRF referer check if this is an allowed cross-domain request.'

def process_view(self, request, callback, callback_args, callback_kwargs):

    if (not is_cross_domain_request_allowed(request)):
        log.debug('Could    not    disable    CSRF    middleware    referer    check    for    cross-domain    request.')
        return
    with skip_cross_domain_referer_check(request):
        return super(CorsCSRFMiddleware, self).process_view(request, callback, callback_args, callback_kwargs)
