[Enhance] Game new/old API prefix list support

- Add some endpoints for old API prefixes to notify users to update the client; add support for multiple game prefixes
This commit is contained in:
Lost-MSth
2024-02-24 16:39:15 +08:00
parent 50369d1f23
commit b3bf55407f
4 changed files with 37 additions and 15 deletions

View File

@@ -106,7 +106,7 @@ def header_check(request) -> ArcError:
headers = request.headers
if Config.ALLOW_APPVERSION: # 版本检查
if 'AppVersion' not in headers or headers['AppVersion'] not in Config.ALLOW_APPVERSION:
return NoAccess('Invalid app version', 1203)
return NoAccess('Invalid app version', 5)
if has_arc_hash and not ArcHashChecker(request).check():
return NoAccess('Invalid request')