diff --git a/main.go b/main.go index be0d755..b1ffd5b 100644 --- a/main.go +++ b/main.go @@ -34,6 +34,7 @@ func main() { u, p, ok := r.BasicAuth() if !ok || subtle.ConstantTimeCompare([]byte(u), []byte(username)) != 1 || subtle.ConstantTimeCompare([]byte(p), []byte(password)) != 1 { + log.Printf("unauthorized request from %s", r.RemoteAddr) w.Header().Set("WWW-Authenticate", `Basic realm="pz8-relay"`) http.Error(w, "unauthorized", http.StatusUnauthorized) return