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