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

@ -351,12 +351,16 @@ func (g *Gateway) handleStatusAPI(w http.ResponseWriter, r *http.Request) {
Name: k.Name,
})
}
scheme := "http"
if r.TLS != nil {
scheme = "https"
}
writeJSON(w, http.StatusOK, map[string]interface{}{
"default_model": g.core.DefaultModel(),
"models": g.core.Registry().ModelList(),
"sources": g.core.Registry().Status(),
"adapters": g.core.ListAdapters(),
"base_url": "http://" + host + "/v1",
"base_url": scheme + "://" + host + "/v1",
"gateway_keys": ks,
})
}