Skip to content

Commit 167ecc0

Browse files
committed
should use the same host as the input
fix #972
1 parent b234eb0 commit 167ecc0

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lib/launcher/url_parser.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,5 +129,12 @@ func ResolveURL(u string) (string, error) {
129129
data, err := ioutil.ReadAll(res.Body)
130130
utils.E(err)
131131

132-
return gson.New(data).Get("webSocketDebuggerUrl").Str(), nil
132+
wsURL := gson.New(data).Get("webSocketDebuggerUrl").Str()
133+
134+
parsedWS, err := url.Parse(wsURL)
135+
utils.E(err)
136+
137+
parsedWS.Host = parsed.Host
138+
139+
return parsedWS.String(), nil
133140
}

0 commit comments

Comments
 (0)