fix(webui): keep the dashboard token out of the startup log
DashboardURL no longer takes a token, so the startup line cannot embed ?t=<token> in the printed URL. The log now names the token file instead.
This commit is contained in:
1 parent
2b514cb526
commit
b107e4452a
2 files changed
+14
-11
No files matched your search
@@ -116,13 +116,18 @@ func Run(ctx context.Context, options Options) error {
|
||||
return fmt.Errorf("listen for ui: %w", err)
|
||||
}
|
||||
cleanups = append(cleanups, func() { _ = listener.Close() })
|
||||
log.Info(
|
||||
"archie-ui running",
|
||||
attrs := []any{
|
||||
"addr", listener.Addr().String(),
|
||||
"open", webui.DashboardURL(listener.Addr().String(), opts.Token),
|
||||
"open", webui.DashboardURL(listener.Addr().String()),
|
||||
"gateway", opts.Gateway.Target,
|
||||
"state", opts.State.Target,
|
||||
)
|
||||
}
|
||||
// Name the file holding the token, never the token itself: this line
|
||||
// reaches the journal and any log an operator pastes.
|
||||
if opts.TokenFile != "" {
|
||||
attrs = append(attrs, "token_file", opts.TokenFile)
|
||||
}
|
||||
log.Info("archie-ui running", attrs...)
|
||||
|
||||
return serve(ctx, listener, srv.Handler(), opts)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user