[Bug fix] Update error & About bundle download

- Data for Arcaea 5.8.0
- Fix a bug that the server's database updates from an old version may meet a challenge if `recent30` table has some strange data.
- Fix the issue where the bundle downloading memory cache does not clean up.
- Add a config term to only change the X-Accel-Redirect prefix for bundle downloading.
This commit is contained in:
Lost-MSth
2024-07-02 22:18:00 +08:00
parent c38208832b
commit 9bb7171354
7 changed files with 68 additions and 6 deletions

View File

@@ -111,7 +111,7 @@ def bundle_download(token: str):
# nginx X-Accel-Redirect
response = make_response()
response.headers['Content-Type'] = 'application/octet-stream'
response.headers['X-Accel-Redirect'] = Config.NGINX_X_ACCEL_REDIRECT_PREFIX + file_path
response.headers['X-Accel-Redirect'] = Config.BUNDLE_NGINX_X_ACCEL_REDIRECT_PREFIX + file_path
return response
return send_from_directory(Constant.CONTENT_BUNDLE_FOLDER_PATH, file_path, as_attachment=True, conditional=True)
except ArcError as e: