feat(seed-warn): dynamic seed key detection in UI modal; feat(https): TLS config (tls_cert_file/tls_key_file) with dynamic base_url; docs: rotate admin key reminder

This commit is contained in:
root
2026-08-10 12:11:32 +08:00
parent a5c370018c
commit fe06e0861a
7 changed files with 59 additions and 7 deletions

View File

@ -115,6 +115,7 @@ func (c *Core) seedKeys() error {
Role: "admin",
Name: name,
CreatedAt: time.Now().Unix(),
Seed: true,
}); err != nil {
return err
}
@ -143,6 +144,11 @@ func (c *Core) GatewayKeys() []string { return c.cfg.GatewayKeys }
func (c *Core) Listen() string { return c.cfg.Listen }
// TLS returns the configured cert/key file paths. Empty strings mean HTTP only.
func (c *Core) TLS() (cert, key string) {
return c.cfg.TLSCertFile, c.cfg.TLSKeyFile
}
// ---- gateway key management (web UI) ----
// ListKeys returns all gateway keys (admin view).