diff --git a/pkg/api/http_server.go b/pkg/api/http_server.go index bcc50b3..655bc72 100644 --- a/pkg/api/http_server.go +++ b/pkg/api/http_server.go @@ -11,7 +11,6 @@ import ( "net" "net/http" "path" - "strings" "sync" httpstatic "github.com/xquare-dashboard/pkg/api/static" @@ -67,9 +66,8 @@ func (hs *HTTPServer) Run(ctx context.Context) error { hs.applyRoutes() // Remove any square brackets enclosing IPv6 addresses, a format we support for backwards compatibility - host := strings.TrimSuffix(strings.TrimPrefix("127.0.0.1", "["), "]") hs.httpSrv = &http.Server{ - Addr: net.JoinHostPort(host, "9090"), + Addr: ":9090", Handler: hs.web, ReadTimeout: 10000, }