From 6fa4ba03dae94f62cc95cbfc9aa65e8e4415d28f Mon Sep 17 00:00:00 2001 From: Saj Goonatilleke Date: Sat, 13 Jul 2019 07:42:17 +1000 Subject: [PATCH] Remove log noise written on the common path Implement analogous functionality in the `logHandler` if you care about this information. That middleware can at least be toggled on and off. --- main.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/main.go b/main.go index 2f58b0a..2db994a 100644 --- a/main.go +++ b/main.go @@ -99,7 +99,6 @@ func checkAuthorizationHeader(handler http.Handler, r *http.Request, w http.Resp } if auth_header[0:6] == "Basic " { - log.Println("Received request with basic auth creds") b_creds, _ := base64.StdEncoding.DecodeString(auth_header[6:]) creds := string(b_creds) if creds == config.BasicAuth { @@ -110,7 +109,6 @@ func checkAuthorizationHeader(handler http.Handler, r *http.Request, w http.Resp username := creds[0:colon_idx] r.Header.Set(config.UsernameHeader, username) r.Header.Del("Authorization") - log.Printf("Accepted basic auth creds for %s\n", username) handler.ServeHTTP(w, r) return true } else {