From 167ecc0d37408d3a9ee8bb21bfc4bc8b4b336a86 Mon Sep 17 00:00:00 2001 From: Yad Smood Date: Mon, 6 Nov 2023 19:25:13 +0800 Subject: [PATCH] should use the same host as the input fix #972 --- lib/launcher/url_parser.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/launcher/url_parser.go b/lib/launcher/url_parser.go index 584713d9..ffda3178 100644 --- a/lib/launcher/url_parser.go +++ b/lib/launcher/url_parser.go @@ -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 }