浏览代码

查询不用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')