From ad4c77b18d12cb9d33ea2f83b04c476c2d1f8adb Mon Sep 17 00:00:00 2001 From: zku Date: Mon, 24 Apr 2023 13:15:04 +0200 Subject: [PATCH] fix launch host name --- sim/web/main.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sim/web/main.go b/sim/web/main.go index 808961e077..503be8527f 100644 --- a/sim/web/main.go +++ b/sim/web/main.go @@ -305,7 +305,10 @@ func (s *server) runServer(useFS bool, host string, launchBrowser bool, simName }) if launchBrowser { - url := fmt.Sprintf("http://localhost%s/wotlk/%s", host, simName) + if strings.HasPrefix(host, ":") { + host = "localhost" + host + } + url := fmt.Sprintf("http://%s/wotlk/%s", host, simName) log.Printf("Launching interface on %s", url) go func() { err := browser.OpenURL(url)