فهرست منبع

添加HTTP_AUTHORIZATION形式token

linhaohong 10 ماه پیش
والد
کامیت
0ad99dae13
1فایلهای تغییر یافته به همراه2 افزوده شده و 0 حذف شده
  1. 2 0
      Controller/AppSetController.py

+ 2 - 0
Controller/AppSetController.py

@@ -35,6 +35,8 @@ class AppSetView(View):
         if operation == 'query':
             return self.do_query(request_dict, response)
         token = request_dict.get('token', None)
+        if not token:
+            token = TokenObject(request.META.get('HTTP_AUTHORIZATION'))
         tko = TokenObject(token)
         if tko.code != 0:
             return response.json(tko.code)