Skip to content

Commit db2bdd1

Browse files
authored
fix: pass sdk header transport to websocket connections (#6521)
Fixes #6520.
1 parent d67552f commit db2bdd1

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

codersdk/provisionerdaemons.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ func (c *Client) provisionerJobLogsAfter(ctx context.Context, path string, after
140140
Value: c.SessionToken(),
141141
}})
142142
httpClient := &http.Client{
143-
Jar: jar,
143+
Jar: jar,
144+
Transport: c.HTTPClient.Transport,
144145
}
145146
conn, res, err := websocket.Dial(ctx, followURL.String(), &websocket.DialOptions{
146147
HTTPClient: httpClient,
@@ -205,7 +206,8 @@ func (c *Client) ServeProvisionerDaemon(ctx context.Context, organization uuid.U
205206
Value: c.SessionToken(),
206207
}})
207208
httpClient := &http.Client{
208-
Jar: jar,
209+
Jar: jar,
210+
Transport: c.HTTPClient.Transport,
209211
}
210212
conn, res, err := websocket.Dial(ctx, serverURL.String(), &websocket.DialOptions{
211213
HTTPClient: httpClient,

codersdk/workspaceagents.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,8 @@ func (c *Client) WorkspaceAgentReconnectingPTY(ctx context.Context, agentID, rec
284284
Value: c.SessionToken(),
285285
}})
286286
httpClient := &http.Client{
287-
Jar: jar,
287+
Jar: jar,
288+
Transport: c.HTTPClient.Transport,
288289
}
289290
conn, res, err := websocket.Dial(ctx, serverURL.String(), &websocket.DialOptions{
290291
HTTPClient: httpClient,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy