Skip to content

Commit

Permalink
Merge pull request #1044 from redpanda-data/rel-2.3/backend-log-webso…
Browse files Browse the repository at this point in the history
…cket-request-origin

backend: log request origin on websocket upgrade
  • Loading branch information
bojand authored Jan 29, 2024
2 parents 9342407 + 63adbaa commit 739b073
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion backend/pkg/api/handle_topic_messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ func (api *API) handleGetMessages() http.HandlerFunc {
CheckOriginFunc: originsCheckFunc(api.Cfg.REST.AllowedOrigins),
}
if err := wsClient.upgrade(w, r); err != nil {
api.Logger.Error("failed to upgrade HTTP connection to websocket connection", zap.Error(err))
api.Logger.Error("failed to upgrade HTTP connection to websocket connection",
zap.String("request_origin", r.Header.Get("Origin")),
zap.Error(err))
return
}
defer wsClient.sendClose()
Expand Down

0 comments on commit 739b073

Please sign in to comment.