Skip to content

Commit

Permalink
should use the same host as the input
Browse files Browse the repository at this point in the history
fix #972
  • Loading branch information
ysmood committed Nov 6, 2023
1 parent b234eb0 commit 167ecc0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/launcher/url_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,5 +129,12 @@ func ResolveURL(u string) (string, error) {
data, err := ioutil.ReadAll(res.Body)
utils.E(err)

return gson.New(data).Get("webSocketDebuggerUrl").Str(), nil
wsURL := gson.New(data).Get("webSocketDebuggerUrl").Str()

parsedWS, err := url.Parse(wsURL)
utils.E(err)

parsedWS.Host = parsed.Host

return parsedWS.String(), nil
}

0 comments on commit 167ecc0

Please sign in to comment.