Update to v2.4

This commit is contained in:
Lost-MSth
2021-05-14 14:06:58 +08:00
parent e3d81436d0
commit 8a3cec05b7
7 changed files with 47 additions and 14 deletions

View File

@@ -172,6 +172,12 @@ def auth_required(request):
user_id = None
headers = request.headers
if 'AppVersion' in headers: # 版本检查
if Config.ALLOW_APPVERSION:
if headers['AppVersion'] not in Config.ALLOW_APPVERSION:
return jsonify({"success": False, "error_code": 5})
if 'Authorization' in headers:
token = headers['Authorization']
token = token[7:]