web: print accessible URL on startup (#6979)

This commit is contained in:
Joe Chen
2022-05-29 19:45:40 +08:00
committed by GitHub
parent d7bda9ac0e
commit 04d3946511

View File

@@ -702,11 +702,10 @@ func runWeb(c *cli.Context) error {
var listenAddr string
if conf.Server.Protocol == "unix" {
listenAddr = conf.Server.HTTPAddr
log.Info("Listen on %v://%s", conf.Server.Protocol, listenAddr)
} else {
listenAddr = fmt.Sprintf("%s:%s", conf.Server.HTTPAddr, conf.Server.HTTPPort)
log.Info("Listen on %v://%s%s", conf.Server.Protocol, listenAddr, conf.Server.Subpath)
}
log.Info("Available on %s", conf.Server.ExternalURL)
switch conf.Server.Protocol {
case "http":