mirror of
https://gitcode.com/JianFeeeee/ModelRouter.git
synced 2026-09-20 08:57:57 +00:00
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:
@ -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).
|
||||
|
||||
Reference in New Issue
Block a user