From 371ae8c5b1b61d1709aed9a11ca1c39a2ccf6bcd Mon Sep 17 00:00:00 2001 From: XingQue Date: Thu, 23 Jul 2026 01:11:49 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AE=A2=E6=9C=8D=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=90=8C=E6=A0=B7=E5=BD=BB=E5=BA=95=E8=B7=B3?= =?UTF-8?q?=E8=BF=87=E9=89=B4=E6=9D=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 避免 kefu-login 因坏 Token / 空鉴权头被 DRF 改写成 403 权限不足。 Co-authored-by: Cursor --- jituan/views.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/jituan/views.py b/jituan/views.py index 60f87c1..cade5a6 100644 --- a/jituan/views.py +++ b/jituan/views.py @@ -123,8 +123,12 @@ class ClubKefuLoginView(APIView): POST /jituan/auth/kefu-login body: { phone, password, erjimima } """ - throttle_classes = [AnonRateThrottle] - permission_classes = [AllowAny] + authentication_classes = () + permission_classes = () + throttle_classes = () + + def initial(self, request, *args, **kwargs): + return def post(self, request): phone = (request.data.get('phone') or '').strip()