diff --git a/.env.example b/.env.example index 87d81c2..ac69492 100644 --- a/.env.example +++ b/.env.example @@ -33,6 +33,16 @@ FOUNDRY_WORLD= # Seconds before an idle headless session is reaped (relay env). HEADLESS_SESSION_TIMEOUT=3600 +# === Dashboard auth (E7) === +# The dashboard binds 127.0.0.1 by default (localhost-only, no auth needed). +# To expose it on your tailnet, pass --host 0.0.0.0 AND set a token below, then +# flip ENABLE_AUTH_MIDDLEWARE=on. With the flag on, a 0.0.0.0 bind WITHOUT a +# token is refused at boot (safe-by-default); the flag on without a token is +# also refused (self-lockout guard — you'd otherwise brick the dashboard). +# (Optional; off-by-default — the dashboard is localhost-only without these.) +DASHBOARD_AUTH_TOKEN= +ENABLE_AUTH_MIDDLEWARE=false + # IMPORTANT — networking: Foundry's rest-api module connects OUT to the relay over # WebSocket. So the relay must be REACHABLE FROM your Foundry host. If Foundry runs # elsewhere, expose RELAY_PORT (port-forward / tailnet / public domain) and point the diff --git a/src/cli.ts b/src/cli.ts index 7dbb39b..3527529 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -193,7 +193,7 @@ export async function cmdUi(opts: CliOptions): Promise { outDir: out, mode: opts.mode, port: opts.port ?? 7788, - host: opts.host ?? "0.0.0.0", + host: opts.host ?? "127.0.0.1", // E7.2: safe-by-default (localhost). --host 0.0.0.0 exposes on the tailnet (needs DASHBOARD_AUTH_TOKEN when ENABLE_AUTH_MIDDLEWARE=on). relayCfg: relayCfg.apiKey ? relayCfg : undefined, foundryCfg: foundryCfg.dataDir ? foundryCfg : undefined, }; diff --git a/src/dashboard.html b/src/dashboard.html index aba0653..8319850 100644 --- a/src/dashboard.html +++ b/src/dashboard.html @@ -76,6 +76,17 @@ +

Foundry ⇄ Obsidian merge

loading…
@@ -126,9 +137,43 @@
Select a row to inspect.