Skip to content

Commit

Permalink
Merge pull request #2989 from zku/master
Browse files Browse the repository at this point in the history
fix launch host name
  • Loading branch information
zku authored Apr 24, 2023
2 parents 33b0b6b + ad4c77b commit 218c8c9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sim/web/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 218c8c9

Please sign in to comment.