Skip to content

Commit a19d198

Browse files
committed
proxyd: print debug log on ws connection
1 parent a95503a commit a19d198

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

proxyd/server.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,14 @@ func (s *Server) HandleWS(w http.ResponseWriter, r *http.Request) {
729729

730730
log.Info("received WS connection", "req_id", GetReqID(ctx))
731731

732+
log.Debug(
733+
"received WS connection",
734+
"req_id", GetReqID(ctx),
735+
"user_agent", r.Header.Get("User-Agent"),
736+
"origin", r.Header.Get("Origin"),
737+
"remote_ip", stripXFF(GetXForwardedFor(ctx)),
738+
)
739+
732740
clientConn, err := s.upgrader.Upgrade(w, r, nil)
733741
if err != nil {
734742
log.Error("error upgrading client conn", "auth", GetAuthCtx(ctx), "req_id", GetReqID(ctx), "err", err)

0 commit comments

Comments
 (0)