|
|
@ -15,7 +15,7 @@ class CheckTokenMiddleware(MiddlewareMixin):
|
|
|
|
def process_request(self, request):
|
|
|
|
def process_request(self, request):
|
|
|
|
# todo 登录时不需要校验token
|
|
|
|
# todo 登录时不需要校验token
|
|
|
|
path_info = request.path_info
|
|
|
|
path_info = request.path_info
|
|
|
|
if path_info.endswith('login') or path_info.endswith('add_user'):
|
|
|
|
if path_info.endswith('login/') or path_info.endswith('add_user'):
|
|
|
|
return
|
|
|
|
return
|
|
|
|
my_auth = request.META.get('HTTP_TOKEN')
|
|
|
|
my_auth = request.META.get('HTTP_TOKEN')
|
|
|
|
if not my_auth:
|
|
|
|
if not my_auth:
|
|
|
|