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:
		
							parent
							
								
									c55602bfb1
								
							
						
					
					
						commit
						6fa4ba03da
					
				
							
								
								
									
										2
									
								
								main.go
								
								
								
								
							
							
						
						
									
										2
									
								
								main.go
								
								
								
								
							|  | @ -99,7 +99,6 @@ func checkAuthorizationHeader(handler http.Handler, r *http.Request, w http.Resp | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	if auth_header[0:6] == "Basic " { | 	if auth_header[0:6] == "Basic " { | ||||||
| 		log.Println("Received request with basic auth creds") |  | ||||||
| 		b_creds, _ := base64.StdEncoding.DecodeString(auth_header[6:]) | 		b_creds, _ := base64.StdEncoding.DecodeString(auth_header[6:]) | ||||||
| 		creds := string(b_creds) | 		creds := string(b_creds) | ||||||
| 		if creds == config.BasicAuth { | 		if creds == config.BasicAuth { | ||||||
|  | @ -110,7 +109,6 @@ func checkAuthorizationHeader(handler http.Handler, r *http.Request, w http.Resp | ||||||
| 			username := creds[0:colon_idx] | 			username := creds[0:colon_idx] | ||||||
| 			r.Header.Set(config.UsernameHeader, username) | 			r.Header.Set(config.UsernameHeader, username) | ||||||
| 			r.Header.Del("Authorization") | 			r.Header.Del("Authorization") | ||||||
| 			log.Printf("Accepted basic auth creds for %s\n", username) |  | ||||||
| 			handler.ServeHTTP(w, r) | 			handler.ServeHTTP(w, r) | ||||||
| 			return true | 			return true | ||||||
| 		} else { | 		} else { | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue