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.
This commit is contained in:
Saj Goonatilleke 2019-07-13 07:42:17 +10:00
parent c55602bfb1
commit 6fa4ba03da
1 changed files with 0 additions and 2 deletions

View File

@ -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 {