mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-23 03:18:59 +00:00
Use JoinHostPort for URL that browser opens (fixes #732)
This commit is contained in:
parent
3b512676b7
commit
24e5000c37
@ -487,13 +487,15 @@ nextRepo:
|
|||||||
proto = "https"
|
proto = "https"
|
||||||
}
|
}
|
||||||
|
|
||||||
l.Infof("Starting web GUI on %s://%s/", proto, net.JoinHostPort(hostShow, strconv.Itoa(addr.Port)))
|
urlShow := fmt.Sprintf("%s://%s/", proto, net.JoinHostPort(hostShow, strconv.Itoa(addr.Port)))
|
||||||
|
l.Infoln("Starting web GUI on", urlShow)
|
||||||
err := startGUI(guiCfg, os.Getenv("STGUIASSETS"), m)
|
err := startGUI(guiCfg, os.Getenv("STGUIASSETS"), m)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
l.Fatalln("Cannot start GUI:", err)
|
l.Fatalln("Cannot start GUI:", err)
|
||||||
}
|
}
|
||||||
if !noBrowser && cfg.Options.StartBrowser && len(os.Getenv("STRESTART")) == 0 {
|
if !noBrowser && cfg.Options.StartBrowser && len(os.Getenv("STRESTART")) == 0 {
|
||||||
openURL(fmt.Sprintf("%s://%s:%d", proto, hostOpen, addr.Port))
|
urlOpen := fmt.Sprintf("%s://%s/", proto, net.JoinHostPort(hostOpen, strconv.Itoa(addr.Port)))
|
||||||
|
openURL(urlOpen)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user