From 304b65bc2ca85348e68a441ee0e866b74dd4d973 Mon Sep 17 00:00:00 2001 From: 18870 Date: Sun, 17 Apr 2022 19:49:04 +0800 Subject: [PATCH] Opt: Allow custom cdn --- deploy/template | 1 + module/webui/app.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/deploy/template b/deploy/template index 1bc140a58..1f6603dbe 100644 --- a/deploy/template +++ b/deploy/template @@ -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 diff --git a/module/webui/app.py b/module/webui/app.py index 6032db6f6..593bef4a4 100644 --- a/module/webui/app.py +++ b/module/webui/app.py @@ -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