소스 검색

查询不用token

peng 2 년 전
부모
커밋
8a9eae7d24
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      background/author.py

+ 1 - 1
background/author.py

@@ -7,7 +7,7 @@ from background.models import WechatUserInfo
 
 class MyAuthentication(BaseAuthentication):
     def authenticate(self, request):
-        if request.method in ["GET", "POST", "PUT", "DELETE"]:
+        if request.method in ["POST", "PUT", "DELETE"]:
             token_obj = request.META.get('HTTP_AUTHORIZATION')
             if not token_obj:
                 raise AuthenticationFailed('缺少token')