Fix some bugs

Fix the fanmade cloud save (add a switch in setting)

Add SSL switch

Fix 'my rank' in game, if there is not enough people behind you, now it will show 20 people as expected
This commit is contained in:
Lost-MSth
2021-04-05 13:02:56 +08:00
parent e216e6144b
commit c51a1b4e85
4 changed files with 954 additions and 906 deletions

View File

@@ -580,7 +580,11 @@ def main():
else:
app.logger.info('Complete!')
app.run(Config.HOST, Config.PORT)
if Config.SSL_CERT and Config.SSL_KEY:
app.run(Config.HOST, Config.PORT, ssl_context=(
Config.SSL_CERT, Config.SSL_KEY))
else:
app.run(Config.HOST, Config.PORT)
if __name__ == '__main__':

File diff suppressed because it is too large Load Diff

View File

@@ -14,6 +14,19 @@ class Config():
--------------------
'''
'''
--------------------
SSL证书路径
留空则使用HTTP
SSL certificate path
If left blank, use HTTP.
'''
SSL_CERT = '' # *.pem
SSL_KEY = '' # *.key
'''
--------------------
'''
'''
--------------------
愚人节模式开关
@@ -95,3 +108,13 @@ class Config():
'''
--------------------
'''
'''
--------------------
是否强制使用全解锁云端存档
If forcing full unlocked cloud save is enabled
'''
SAVE_FULL_UNLOCK = True
'''
--------------------
'''