Skip to content

Commit

Permalink
feat(backend): moved batch info to query param
Browse files Browse the repository at this point in the history
  • Loading branch information
zavorotynskiy committed Apr 5, 2024
1 parent 8003de2 commit 54156fc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions backend/internal/http/router/handlers-web.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,9 @@ func (e *Router) pushMessagesHandlerWeb(w http.ResponseWriter, r *http.Request)
bodySize := 0

// Get debug header with batch info
batch := r.Header.Get("X-Openreplay-Batch")
r = r.WithContext(context.WithValue(r.Context(), "batch", batch))
if batch := r.URL.Query().Get("batch"); batch != "" {
r = r.WithContext(context.WithValue(r.Context(), "batch", batch))
}

// Check authorization
sessionData, err := e.services.Tokenizer.ParseFromHTTPRequest(r)
Expand Down

0 comments on commit 54156fc

Please sign in to comment.