Skip to content

Commit

Permalink
Fix whois logging
Browse files Browse the repository at this point in the history
  • Loading branch information
kotx committed Dec 8, 2024
1 parent 9007424 commit 95ee22d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion cmd/proxy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,16 @@ func main() {
http.Error(writer, err.Error(), 500)
return
}
slog.Debug("tailscale", "whois", who)

if who != nil {
slog.Debug("tailscale", slog.Group("whois",
"node", who.Node.Name,
"login_name", strings.ToLower(who.UserProfile.LoginName),
"display_name", strings.ToLower(who.UserProfile.DisplayName),
))
} else {
slog.Debug("tailscale", "whois", nil)
}

req.Host = endpointUrl.Host
for key, value := range req.Header {
Expand Down

0 comments on commit 95ee22d

Please sign in to comment.