mirror of
https://github.com/MeoProject/lx-music-api-server.git
synced 2025-07-07 06:52:11 +08:00
chore: 优化
This commit is contained in:
@ -3,7 +3,7 @@
|
|||||||
# ----------------------------------------
|
# ----------------------------------------
|
||||||
# - mode: python -
|
# - mode: python -
|
||||||
# - author: helloplhm-qwq -
|
# - author: helloplhm-qwq -
|
||||||
# - name: main.py -
|
# - name: main-flask.py -
|
||||||
# - project: lx-music-api-server -
|
# - project: lx-music-api-server -
|
||||||
# - license: MIT -
|
# - license: MIT -
|
||||||
# ----------------------------------------
|
# ----------------------------------------
|
||||||
@ -95,6 +95,7 @@ def check():
|
|||||||
if config.read_config("security.allowed_host.blacklist.enable"):
|
if config.read_config("security.allowed_host.blacklist.enable"):
|
||||||
config.ban_ip(request.remote_addr, int(config.read_config("security.allowed_host.blacklist.length")))
|
config.ban_ip(request.remote_addr, int(config.read_config("security.allowed_host.blacklist.length")))
|
||||||
return handleResult({'code': 6, 'msg': '未找到您所请求的资源', 'data': None}), 404
|
return handleResult({'code': 6, 'msg': '未找到您所请求的资源', 'data': None}), 404
|
||||||
|
|
||||||
# run
|
if (__name__ == '__main__'):
|
||||||
app.run(host=config.read_config('common.host'), port=config.read_config('common.port'))
|
# run
|
||||||
|
app.run(host=config.read_config('common.host'), port=config.read_config('common.port'))
|
||||||
|
Reference in New Issue
Block a user