'Whitelist only a few URLs, otherwise fail.'

def process_request(self, request):

    if (settings.LOCKDOWN and (not request.is_logged_in) and (request.path not in [reverse('facility_user_signup'), reverse('dynamic_js'), reverse('dynamic_css')]) and (not request.path.startswith('/api/')) and (not request.path.startswith('/securesync/api/user/')) and (not request.path.startswith(settings.STATIC_URL)) and (not (request.GET.get('login', '') == 'True'))):
        raise PermissionDenied()
