瀏覽代碼

fix(cli): apply -webCert/-webCertKey on the setting subcommand (#5482)

The setting subcommand registers the -webCert and -webCertKey flags but
the "setting" case only calls updateSetting(), which ignores cert paths.
The flags were silently accepted and discarded, so a fresh panel stayed
HTTP-only (no webCertFile/webKeyFile written, "Panel is not secure with
SSL", browser ERR_SSL_PROTOCOL_ERROR). updateCert() was reachable only
through the separate "cert" case.

Call updateCert(webCertFile, webKeyFile) inside the "setting" case when
either flag is set, mirroring the "cert" subcommand. saveSetting() already
upserts, so this works on a fresh DB.

Co-authored-by: taov.rustam <[email protected]>
Co-authored-by: Claude Opus 4.8 <[email protected]>
Rustam 8 小時之前
父節點
當前提交
2392f04e02
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      main.go

+ 3 - 0
main.go

@@ -623,6 +623,9 @@ func main() {
 				return
 			}
 		}
+		if webCertFile != "" || webKeyFile != "" {
+			updateCert(webCertFile, webKeyFile)
+		}
 		if show {
 			showSetting(show)
 		}