diff --git a/controllers/nginx/pkg/cmd/controller/nginx.go b/controllers/nginx/pkg/cmd/controller/nginx.go index ca4f7e978..7047cec4d 100644 --- a/controllers/nginx/pkg/cmd/controller/nginx.go +++ b/controllers/nginx/pkg/cmd/controller/nginx.go @@ -83,7 +83,13 @@ func newNGINXController() ingress.Controller { configmap: &api_v1.ConfigMap{}, isIPV6Enabled: isIPv6Enabled(), resolver: h, - proxy: &proxy{}, + proxy: &proxy{ + Default: &server{ + Hostname: "localhost", + IP: "127.0.0.1", + Port: 442, + }, + }, } listener, err := net.Listen("tcp", ":443") diff --git a/controllers/nginx/pkg/cmd/controller/tcp.go b/controllers/nginx/pkg/cmd/controller/tcp.go index 5c481f6f3..54bafc8be 100644 --- a/controllers/nginx/pkg/cmd/controller/tcp.go +++ b/controllers/nginx/pkg/cmd/controller/tcp.go @@ -27,11 +27,7 @@ func (p *proxy) Get(host string) *server { } } - return &server{ - Hostname: "localhost", - IP: "127.0.0.1", - Port: 442, - } + return p.Default } func (p *proxy) Handle(conn net.Conn) {