[Enhance] Some config options & Login limiter

- Add limiter for login and API login
- Add some config options

- Delete `setting.py` files
This commit is contained in:
Lost-MSth
2022-10-16 17:07:32 +08:00
parent ba36190f30
commit d150553e6b
8 changed files with 50 additions and 273 deletions

View File

@@ -6,6 +6,10 @@ class Config:
HOST = '0.0.0.0'
PORT = 80
USE_GEVENT_WSGI = False
USE_PROXY_FIX = False
USE_CORS = False
GAME_API_PREFIX = '/join/21'
ALLOW_APPVERSION = [] # list[str]
@@ -36,6 +40,9 @@ class Config:
DOWNLOAD_LINK_PREFIX = ''
DOWNLOAD_USE_NGINX_X_ACCEL_REDIRECT = False
NGINX_X_ACCEL_REDIRECT_PREFIX = '/nginx_download/'
DOWNLOAD_TIMES_LIMIT = 3000
DOWNLOAD_TIME_GAP_LIMIT = 1000
@@ -69,6 +76,9 @@ class Config:
SONGLIST_FILE_PATH = './database/songs/songlist'
SQLITE_DATABASE_PATH = './database/arcaea_database.db'
GAME_LOGIN_RATE_LIMIT = '30/5 minutes'
API_LOGIN_RATE_LIMIT = '10/5 minutes'
class ConfigManager: