mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-26 09:52:11 +03:00
Electron persists secrets (JWT_SECRET, API_KEY_SECRET, STORAGE_ENCRYPTION_KEY) to <DATA_DIR>/server.env, but the CLI bootstrap only ever loaded <DATA_DIR>/.env. Copying storage.sqlite + server.env from an Electron install to the CLI (exactly as the app's own UI text instructs) silently lost STORAGE_ENCRYPTION_KEY, permanently corrupting every encrypted provider credential. bin/omniroute.mjs now does a one-time, one-directory migration: if <DATA_DIR>/.env is absent but <DATA_DIR>/server.env is present, copy it to .env before the normal env-file loading loop runs. An existing .env is never overwritten -- it always wins over a legacy server.env.
194 B
194 B
- fix(cli): load DATA_DIR/server.env as a fallback for .env when migrating from Electron, so STORAGE_ENCRYPTION_KEY/JWT_SECRET/API_KEY_SECRET survive an Electron→CLI install migration (#7302)