Skip to content

Commit 0657e94

Browse files
authoredMay 15, 2019
Adjust websocket scheme based on base URL scheme (#18)
1 parent f613394 commit 0657e94

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎client/output.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,12 @@ type OutputReader interface {
2323
// GetOutput reads the build output log for the provided buildID - streaming to
2424
// OutputReader. The context controls the lifetime of the request.
2525
func (c *Client) GetOutput(ctx context.Context, buildID string, or OutputReader) error {
26+
wsScheme := "ws"
27+
if c.BaseURL.Scheme == "https" {
28+
wsScheme = "wss"
29+
}
2630
u := c.BaseURL.ResolveReference(&url.URL{
27-
Scheme: "ws",
31+
Scheme: wsScheme,
2832
Host: c.BaseURL.Host,
2933
Path: "/v1/build-ws/" + buildID,
3034
RawQuery: "",

0 commit comments

Comments
 (0)
Please sign in to comment.