@@ -57,6 +57,7 @@ var _ = framework.DescribeSetting("use-forwarded-headers", func() {
57
57
WithHeader ("Host" , host ).
58
58
WithHeader ("X-Forwarded-Port" , "1234" ).
59
59
WithHeader ("X-Forwarded-Proto" , "myproto" ).
60
+ WithHeader ("X-Forwarded-Scheme" , "myproto" ).
60
61
WithHeader ("X-Forwarded-For" , "1.2.3.4" ).
61
62
WithHeader ("X-Forwarded-Host" , "myhost" ).
62
63
Expect ().
@@ -67,6 +68,7 @@ var _ = framework.DescribeSetting("use-forwarded-headers", func() {
67
68
assert .Contains (ginkgo .GinkgoT (), body , fmt .Sprintf ("host=myhost" ))
68
69
assert .Contains (ginkgo .GinkgoT (), body , fmt .Sprintf ("x-forwarded-host=myhost" ))
69
70
assert .Contains (ginkgo .GinkgoT (), body , fmt .Sprintf ("x-forwarded-proto=myproto" ))
71
+ assert .Contains (ginkgo .GinkgoT (), body , fmt .Sprintf ("x-forwarded-scheme=myproto" ))
70
72
assert .Contains (ginkgo .GinkgoT (), body , fmt .Sprintf ("x-forwarded-port=1234" ))
71
73
assert .Contains (ginkgo .GinkgoT (), body , fmt .Sprintf ("x-forwarded-for=1.2.3.4" ))
72
74
@@ -105,6 +107,7 @@ var _ = framework.DescribeSetting("use-forwarded-headers", func() {
105
107
WithHeader ("Host" , host ).
106
108
WithHeader ("X-Forwarded-Port" , "1234" ).
107
109
WithHeader ("X-Forwarded-Proto" , "myproto" ).
110
+ WithHeader ("X-Forwarded-Scheme" , "myproto" ).
108
111
WithHeader ("X-Forwarded-For" , "1.2.3.4" ).
109
112
WithHeader ("X-Forwarded-Host" , "myhost" ).
110
113
Expect ().
@@ -115,10 +118,12 @@ var _ = framework.DescribeSetting("use-forwarded-headers", func() {
115
118
assert .Contains (ginkgo .GinkgoT (), body , fmt .Sprintf ("host=forwarded-headers" ))
116
119
assert .Contains (ginkgo .GinkgoT (), body , fmt .Sprintf ("x-forwarded-port=80" ))
117
120
assert .Contains (ginkgo .GinkgoT (), body , fmt .Sprintf ("x-forwarded-proto=http" ))
121
+ assert .Contains (ginkgo .GinkgoT (), body , fmt .Sprintf ("x-forwarded-scheme=http" ))
118
122
assert .Contains (ginkgo .GinkgoT (), body , fmt .Sprintf ("x-original-forwarded-for=1.2.3.4" ))
119
123
assert .NotContains (ginkgo .GinkgoT (), body , fmt .Sprintf ("host=myhost" ))
120
124
assert .NotContains (ginkgo .GinkgoT (), body , fmt .Sprintf ("x-forwarded-host=myhost" ))
121
125
assert .NotContains (ginkgo .GinkgoT (), body , fmt .Sprintf ("x-forwarded-proto=myproto" ))
126
+ assert .NotContains (ginkgo .GinkgoT (), body , fmt .Sprintf ("x-forwarded-scheme=myproto" ))
122
127
assert .NotContains (ginkgo .GinkgoT (), body , fmt .Sprintf ("x-forwarded-port=1234" ))
123
128
assert .NotContains (ginkgo .GinkgoT (), body , fmt .Sprintf ("x-forwarded-for=1.2.3.4" ))
124
129
})
0 commit comments