|
@@ -7,7 +7,7 @@ from background.models import WechatUserInfo
|
|
|
|
|
|
class MyAuthentication(BaseAuthentication):
|
|
class MyAuthentication(BaseAuthentication):
|
|
def authenticate(self, request):
|
|
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')
|
|
token_obj = request.META.get('HTTP_AUTHORIZATION')
|
|
if not token_obj:
|
|
if not token_obj:
|
|
raise AuthenticationFailed('缺少token')
|
|
raise AuthenticationFailed('缺少token')
|