remove log

This commit is contained in:
Erik Winter 2024-01-20 13:35:17 +01:00
parent 4d45b41645
commit 2af51cdb81
1 changed files with 0 additions and 1 deletions

View File

@ -42,7 +42,6 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
rec.Header().Add("Content-Type", "application/json") rec.Header().Add("Content-Type", "application/json")
// authenticate // authenticate
logger.Info("authenticating", "key", r.Header.Get("Authorization"), "apiKey", s.apiKey)
if key := r.Header.Get("Authorization"); s.apiKey != "localOnly" && key != s.apiKey { if key := r.Header.Get("Authorization"); s.apiKey != "localOnly" && key != s.apiKey {
Error(rec, http.StatusUnauthorized, "unauthorized", fmt.Errorf("invalid api key"), logger) Error(rec, http.StatusUnauthorized, "unauthorized", fmt.Errorf("invalid api key"), logger)
logger.Info("unauthorized", "key", key) logger.Info("unauthorized", "key", key)