summaryrefslogtreecommitdiffstats
path: root/cmd/web.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/web.go')
-rw-r--r--cmd/web.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/web.go b/cmd/web.go
index 243b9a4108..6efadb9419 100644
--- a/cmd/web.go
+++ b/cmd/web.go
@@ -7,6 +7,7 @@ package cmd
import (
"context"
"fmt"
+ "net"
"net/http"
_ "net/http/pprof" // Used for debugging if enabled and a web server is running
"os"
@@ -156,7 +157,7 @@ func runWeb(ctx *cli.Context) error {
listenAddr := setting.HTTPAddr
if setting.Protocol != setting.UnixSocket && setting.Protocol != setting.FCGIUnix {
- listenAddr += ":" + setting.HTTPPort
+ listenAddr = net.JoinHostPort(listenAddr, setting.HTTPPort)
}
log.Info("Listen: %v://%s%s", setting.Protocol, listenAddr, setting.AppSubURL)