From 13b88ba2e7ede1e6ff2acb65b2966ea6d7dae40c Mon Sep 17 00:00:00 2001 From: phamnazage-jpg Date: Sun, 7 Jun 2026 14:49:52 +0800 Subject: [PATCH] debug(gateway): add log to verify key admin_status at gateway --- internal/app/http_api.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/app/http_api.go b/internal/app/http_api.go index 6badb690..f26e661a 100644 --- a/internal/app/http_api.go +++ b/internal/app/http_api.go @@ -7,6 +7,7 @@ import ( "errors" "fmt" "io" + "log" "net/http" "os" "path/filepath" @@ -2719,7 +2720,8 @@ func handlePublicV1ChatCompletions(w http.ResponseWriter, r *http.Request, dsn s key := keys[0] - // 3. Governance check + // Governance check + log.Printf("gateway: key %s admin_status=%s paused=%v fingerprint=%s", key.KeyID, key.AdminStatus, key.AdminStatus == "paused", keyFingerprint) if key.AdminStatus == "paused" { writeHTTPError(w, &httpError{StatusCode: http.StatusForbidden, Code: "key_paused", Message: "API key is paused"}) return