From 04ef9d5edba7ba6d7d852ff81d1aaeec98a8e479 Mon Sep 17 00:00:00 2001 From: Brice Amen Date: Tue, 17 Dec 2024 11:36:36 +0100 Subject: [PATCH] refactor(run): use url.Hostname() instead of manual string splitting --- apps/run.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/run.go b/apps/run.go index 66c9e3be..b172f826 100644 --- a/apps/run.go +++ b/apps/run.go @@ -334,7 +334,7 @@ func (runCtx *runContext) connectToRunServer(ctx context.Context) (*http.Respons // Wrap with TLS if using HTTPS if url.Scheme == "https" { tlsConfig := config.TLSConfig.Clone() - tlsConfig.ServerName = strings.Split(url.Host, ":")[0] + tlsConfig.ServerName = url.Hostname() conn = tls.Client(conn, tlsConfig) }