fix: generate token on start, include token in URL, reset api_server config

- Pre-generate auth token before server start and pass via AUTH_TOKEN env var
- Append token to startup URL for auto-login
- Reset api_server config values to defaults on startup

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
ekko
2026-04-15 08:28:36 +08:00
parent 1f45254dd0
commit 66cc9a6f1e
4 changed files with 24 additions and 69 deletions
+1 -1
View File
@@ -196,7 +196,7 @@ async function ensureApiServerConfig() {
let changed = false
for (const [k, v] of Object.entries(defaults)) {
if (api[k] == null) {
if (api[k] != null && api[k] !== v) {
api[k] = v
changed = true
}