From c0d7f3f9168a95e1136bb668d5b49ad5d4aa761e Mon Sep 17 00:00:00 2001 From: Johan Brandhorst-Satzkorn Date: Wed, 22 May 2024 12:32:13 -0700 Subject: [PATCH] clientagentcmd: use "localhost" to call client agent The client agent serves on "localhost:9300" by default. It appears on some systems this resolves to ::1:9300 and on some systems 127.0.0.1:9300. We should use the same address on the client as the server to avoid any incompatibilities between systems. --- internal/cmd/commands/clientagentcmd/clientagentcmd.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/cmd/commands/clientagentcmd/clientagentcmd.go b/internal/cmd/commands/clientagentcmd/clientagentcmd.go index e0eff3705c..a014cc96e1 100644 --- a/internal/cmd/commands/clientagentcmd/clientagentcmd.go +++ b/internal/cmd/commands/clientagentcmd/clientagentcmd.go @@ -68,5 +68,5 @@ func (c *ClientAgentCommand) Run(args []string) int { // clientAgentUrl constructs the full URL for a client agent request given a port and path. func clientAgentUrl(port uint, path string) string { - return fmt.Sprintf("http://127.0.0.1:%d/%s", port, path) + return fmt.Sprintf("http://localhost:%d/%s", port, path) }