mirror of
https://github.com/livekit/livekit.git
synced 2026-11-23 02:29:22 +00:00
Log invalid APIKey on API failures. (#4762)
Useful to understand which key is used.
This commit is contained in:
1 parent
68ecd38c00
commit
035bef4111
1 file changed
+1
-1
+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