Merge pull request #4956 from djboris9/proxy-protocol-port

Fix proxy protocol support for X-Forwarded-Port
This commit is contained in:
Kubernetes Prow Robot 2020-01-26 12:27:02 -08:00 committed by GitHub
commit 2f8cbeb8fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 2 deletions

View file

@ -68,7 +68,7 @@ var _ = framework.IngressNginxDescribe("Proxy Protocol", func() {
Expect(err).NotTo(HaveOccurred(), "unexpected error reading connection data")
body := string(data)
Expect(body).Should(ContainSubstring(fmt.Sprintf("host=%v", "proxy-protocol")))
Expect(body).Should(ContainSubstring(fmt.Sprintf("x-forwarded-port=80")))
Expect(body).Should(ContainSubstring(fmt.Sprintf("x-forwarded-port=1234")))
Expect(body).Should(ContainSubstring(fmt.Sprintf("x-forwarded-for=192.168.0.1")))
})
})