Log invalid APIKey on API failures. (#4762)

Useful to understand which key is used.
This commit is contained in:
Raja Subramanian
2026-08-14 17:20:10 +05:30
committed by GitHub
parent 68ecd38c00
commit 035bef4111
+1 -1
View File
@@ -89,7 +89,7 @@ func (m *APIKeyAuthMiddleware) ServeHTTP(w http.ResponseWriter, r *http.Request,
secret := m.provider.GetSecret(v.APIKey())
if secret == "" {
HandleError(w, r, http.StatusUnauthorized, ErrInvalidAPIKey)
HandleError(w, r, http.StatusUnauthorized, ErrInvalidAPIKey, "apiKey", v.APIKey())
return
}