From fcfdaf853de401b72e98811f6db6bddda79bc657 Mon Sep 17 00:00:00 2001 From: isaac Date: Wed, 29 Aug 2018 14:38:55 +0100 Subject: [PATCH] Make socket address obvious We don't need a valid http host for the nginx api when we use a socket. The host is ignored. This change makes it more obvious that the host is unnecessary. --- nginx-controller/main.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nginx-controller/main.go b/nginx-controller/main.go index 2d1fde61d3..90d3358fb3 100644 --- a/nginx-controller/main.go +++ b/nginx-controller/main.go @@ -220,8 +220,7 @@ func main() { if *nginxPlus { time.Sleep(500 * time.Millisecond) httpClient := getSocketClient() - apiURL := fmt.Sprintf("http://127.0.0.1:%v/api", *nginxStatusPort) - nginxAPI, err = plus.NewNginxAPIController(&httpClient, apiURL, local) + nginxAPI, err = plus.NewNginxAPIController(&httpClient, "http://nginx-plus-api/api", local) if err != nil { glog.Fatalf("Failed to create NginxAPIController: %v", err) }