Skip to content

Commit 9eb9325

Browse files
isaacisaachawley
authored andcommitted
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.
1 parent d2c4f38 commit 9eb9325

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

nginx-controller/main.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,7 @@ func main() {
220220
if *nginxPlus {
221221
time.Sleep(500 * time.Millisecond)
222222
httpClient := getSocketClient()
223-
apiURL := fmt.Sprintf("http://127.0.0.1:%v/api", *nginxStatusPort)
224-
nginxAPI, err = plus.NewNginxAPIController(&httpClient, apiURL, local)
223+
nginxAPI, err = plus.NewNginxAPIController(&httpClient, "http://nginx-plus-api/api", local)
225224
if err != nil {
226225
glog.Fatalf("Failed to create NginxAPIController: %v", err)
227226
}

0 commit comments

Comments
 (0)