Skip to content

Commit

Permalink
Merge pull request #1473 from aledbf/master
Browse files Browse the repository at this point in the history
Fix proxy protocol check
  • Loading branch information
aledbf committed Oct 4, 2017
2 parents 0f351e2 + c7bf08c commit 1c6ff88
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions controllers/nginx/pkg/template/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import (

"github.com/pborman/uuid"

apiv1 "k8s.io/api/core/v1"
extensions "k8s.io/api/extensions/v1beta1"
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/ingress/controllers/nginx/pkg/config"
Expand Down Expand Up @@ -678,9 +677,7 @@ func trustHTTPHeaders(input interface{}) bool {
}

return conf.Cfg.RealClientFrom == "http-proxy" ||
(conf.Cfg.RealClientFrom == "auto" && !conf.Cfg.UseProxyProtocol ||
(conf.Cfg.RealClientFrom == "auto" && conf.PublishService != nil &&
conf.PublishService.Spec.Type == apiv1.ServiceTypeLoadBalancer))
(conf.Cfg.RealClientFrom == "auto" && !conf.Cfg.UseProxyProtocol)
}

func trustProxyProtocol(input interface{}) bool {
Expand Down

0 comments on commit 1c6ff88

Please sign in to comment.