summaryrefslogtreecommitdiff
path: root/internal/server/server.go
diff options
context:
space:
mode:
authorJames Elliott <james-d-elliott@users.noreply.github.com>2022-03-25 11:56:23 +1100
committerGitHub <noreply@github.com>2022-03-25 11:56:23 +1100
commit2f31db2db36d0b1b788ea227c4afe5135bb38412 (patch)
tree1c35422df18ea5a18048611e973ec5ab3e3e2f5d /internal/server/server.go
parent91a3bc6d613d0ae2dcec538bbd652ea201ecb9c5 (diff)
fix(server): healthcheck ipv6 format is invalid (#3055)
This fixes an issue with the healthcheck writting the IPv6 host without brackets.
Diffstat (limited to 'internal/server/server.go')
-rw-r--r--internal/server/server.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/internal/server/server.go b/internal/server/server.go
index d27f0e803..221ed5cdb 100644
--- a/internal/server/server.go
+++ b/internal/server/server.go
@@ -179,9 +179,9 @@ func Start(configuration schema.Configuration, providers middlewares.Providers)
WriteBufferSize: configuration.Server.WriteBufferSize,
}
- addrPattern := net.JoinHostPort(configuration.Server.Host, strconv.Itoa(configuration.Server.Port))
+ address := net.JoinHostPort(configuration.Server.Host, strconv.Itoa(configuration.Server.Port))
- listener, err := net.Listen("tcp", addrPattern)
+ listener, err := net.Listen("tcp", address)
if err != nil {
logger.Fatalf("Error initializing listener: %s", err)
}
@@ -192,9 +192,9 @@ func Start(configuration schema.Configuration, providers middlewares.Providers)
}
if configuration.Server.Path == "" {
- logger.Infof("Listening for TLS connections on '%s' path '/'", addrPattern)
+ logger.Infof("Listening for TLS connections on '%s' path '/'", address)
} else {
- logger.Infof("Listening for TLS connections on '%s' paths '/' and '%s'", addrPattern, configuration.Server.Path)
+ logger.Infof("Listening for TLS connections on '%s' paths '/' and '%s'", address, configuration.Server.Path)
}
logger.Fatal(server.ServeTLS(listener, configuration.Server.TLS.Certificate, configuration.Server.TLS.Key))
@@ -204,9 +204,9 @@ func Start(configuration schema.Configuration, providers middlewares.Providers)
}
if configuration.Server.Path == "" {
- logger.Infof("Listening for non-TLS connections on '%s' path '/'", addrPattern)
+ logger.Infof("Listening for non-TLS connections on '%s' path '/'", address)
} else {
- logger.Infof("Listening for non-TLS connections on '%s' paths '/' and '%s'", addrPattern, configuration.Server.Path)
+ logger.Infof("Listening for non-TLS connections on '%s' paths '/' and '%s'", address, configuration.Server.Path)
}
logger.Fatal(server.Serve(listener))
}