From 7ac8e91cc2d4523fe286025258ea38e1d94360a3 Mon Sep 17 00:00:00 2001 From: Bennett Wetters Date: Mon, 15 Jan 2024 22:32:07 +0100 Subject: [PATCH] Improve logging in handlers/util.go --- handlers/util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handlers/util.go b/handlers/util.go index 319c726..927b6c9 100644 --- a/handlers/util.go +++ b/handlers/util.go @@ -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