Skip to content

Commit

Permalink
feat: support HTTPS inside websocket (tendermint#9416)
Browse files Browse the repository at this point in the history
  • Loading branch information
RiccardoM authored Sep 13, 2022
1 parent dfefd83 commit 8e90d29
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions rpc/jsonrpc/client/ws_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,10 @@ func NewWS(remoteAddr, endpoint string, options ...func(*WSClient)) (*WSClient,
if err != nil {
return nil, err
}
// default to ws protocol, unless wss is explicitly specified
if parsedURL.Scheme != protoWSS {
// default to ws protocol, unless wss or https is specified
if parsedURL.Scheme == protoHTTPS {
parsedURL.Scheme = protoWSS
} else if parsedURL.Scheme != protoWSS {
parsedURL.Scheme = protoWS
}

Expand Down

0 comments on commit 8e90d29

Please sign in to comment.