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

@ -114,6 +114,14 @@ func (g *Gateway) handleKeyMe(w http.ResponseWriter, r *http.Request) {
writeError(w, http.StatusUnauthorized, "invalid_api_key", "key not found")
return
}
if !rec.Seed {
for _, s := range g.core.GatewayKeys() {
if s == rec.Key {
rec.Seed = true
break
}
}
}
writeJSON(w, http.StatusOK, map[string]interface{}{"key": rec})
}