mirror of
https://github.com/livekit/livekit.git
synced 2026-08-15 02:39:50 +00:00
Log invalid APIKey on API failures. (#4762)
Useful to understand which key is used.
This commit is contained in:
+1
-1
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user