Improve logging #17
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@ func updateEndpointValidator(
|
|||
// Check BasicAuth credentials
|
||||
username, password, ok := r.BasicAuth()
|
||||
if !ok || !util.CheckCredentials(authDB, validCredentials, username, password) {
|
||||
log.Println("Unauthorized request from", r.RemoteAddr)
|
||||
log.Println("Unauthorized request from", r.RemoteAddr, "Username:", username, "Password:", password)
|
||||
w.Header().Set("WWW-Authenticate", "Basic realm=\"space-api\"")
|
||||
w.WriteHeader(http.StatusUnauthorized)
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue