Skip to content

Commit

Permalink
enable livelogs websocket compression
Browse files Browse the repository at this point in the history
  • Loading branch information
sebv committed Jan 24, 2024
1 parent e40507f commit 0ed5630
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions internal/http/imagerunner.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,12 @@ func (c *ImageRunner) OpenAsyncEventsWebsocket(ctx context.Context, id string, l
url := fmt.Sprintf("%s/v1alpha1/hosted/async/image/runners/%s/events%s", websocketURL, id, query)
headers := http.Header{}
headers.Add("Authorization", req.Header.Get("Authorization"))
ws, _, err := websocket.DefaultDialer.Dial(
url, headers)
dialer := websocket.Dialer{
Proxy: http.ProxyFromEnvironment,
HandshakeTimeout: 45 * time.Second,
EnableCompression: true,
}
ws, _, err := dialer.Dial(url, headers)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 0ed5630

Please sign in to comment.