Skip to content

Commit

Permalink
Add new auth headers required for tailing k6 Cloud logs
Browse files Browse the repository at this point in the history
  • Loading branch information
federicotdn authored and mstoykov committed Jul 26, 2023
1 parent 9fb9b88 commit 6c31075
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cloudapi/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ func (c *Config) logtailConn(ctx context.Context, referenceID string, since time

headers := make(http.Header)
headers.Add("Sec-WebSocket-Protocol", "token="+c.Token.String)
headers.Add("Authorization", "token "+c.Token.String)
headers.Add("X-K6TestRun-Id", referenceID)

var conn *websocket.Conn
err = retry(sleeperFunc(time.Sleep), 3, 5*time.Second, 2*time.Minute, func() (err error) {
Expand Down

0 comments on commit 6c31075

Please sign in to comment.