Skip to content

Commit 41b9e25

Browse files
unknwonachilleas-k
authored andcommitted
cmd/web: fix wrong ExternalURL when specify port via CLI flag
Fixes #5936.
1 parent fb7c487 commit 41b9e25

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/cmd/web.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ func runWeb(c *cli.Context) error {
706706

707707
// Flag for port number in case first time run conflict.
708708
if c.IsSet("port") {
709-
conf.Server.URL.Host = strings.Replace(conf.Server.URL.Host, conf.Server.URL.Port(), c.String("port"), 1)
709+
conf.Server.URL.Host = strings.Replace(conf.Server.URL.Host, ":"+conf.Server.URL.Port(), ":"+c.String("port"), 1)
710710
conf.Server.ExternalURL = conf.Server.URL.String()
711711
conf.Server.HTTPPort = c.String("port")
712712
}

0 commit comments

Comments
 (0)