Opt: Allow custom cdn

This commit is contained in:
18870 2022-04-17 19:49:04 +08:00
parent f04a35b078
commit 304b65bc2c
2 changed files with 2 additions and 1 deletions

View File

@ -129,4 +129,5 @@ Deploy:
# --cdn. Use jsdelivr cdn for pywebio static files (css, js).
# 'true' for jsdelivr cdn
# 'false' for self host cdn (automatically)
# 'https://path.to.your/cdn' to use custom cdn
CDN: false

View File

@ -1067,7 +1067,7 @@ def app():
AlasGUI.set_theme(theme=Setting.webui_config.Theme)
lang.LANG = Setting.webui_config.Language
key = args.key or Setting.webui_config.Password
cdn = args.cdn or (Setting.webui_config.CDN == "true") or False
cdn = args.cdn or (False if Setting.webui_config.CDN == "false" else Setting.webui_config.CDN) or False
Setting.reload = args.reload or Setting.webui_config.bool("EnableReload")
Setting.electron = args.electron