def METHOD_NAME(*args, **kwargs):
    if authed():
        return f(*args, **kwargs)
    else:
        if (
            request.content_type == "application/json"
            or request.accept_mimetypes.best == "text/event-stream"
        ):
            abort(403)
        else:
            return redirect(url_for("auth.register", next=request.full_path))