We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 69152c6 commit cb962aaCopy full SHA for cb962aa
go/config/haproxy_config.go
@@ -27,6 +27,10 @@ func (h *HostPort) URL() *url.URL {
27
}
28
29
func ParseHostPort(address string) (hostPort *HostPort, err error) {
30
+ if !strings.Contains(address, ":") {
31
+ return &HostPort{Host: address, Port: 80}, nil
32
+ }
33
+
34
tokens := strings.SplitN(address, ":", 2)
35
if len(tokens) != 2 {
36
return nil, fmt.Errorf("Cannot parse HostPort from %s. Expected format is host:port", address)
0 commit comments