def METHOD_NAME(self, request, format=None):
    path = request.GET.METHOD_NAME("path")
    try:
        view, args, kwargs = resolve(path)
        kwargs["request"] = request
        kwargs["request"].path = path
        v = view(*args, **kwargs)
        have_to_login = v.url.split("?")[0] == settings.LOGIN_URL
        return Response(data=have_to_login)
    except Exception:
        return Response(data=False)