@@ -175,13 +175,15 @@ var _ = framework.IngressNginxDescribe("[Flag] enable-ssl-passthrough", func() {
175
175
return strings .Contains (server , "listen 442" )
176
176
})
177
177
178
+ //nolint:gosec // Ignore the gosec error in testing
178
179
f .HTTPTestClientWithTLSConfig (& tls.Config {ServerName : host , InsecureSkipVerify : true }).
179
180
GET ("/" ).
180
181
WithURL (url ).
181
182
ForceResolve (f .GetNginxIP (), 443 ).
182
183
Expect ().
183
184
Status (http .StatusOK )
184
185
186
+ //nolint:gosec // Ignore the gosec error in testing
185
187
f .HTTPTestClientWithTLSConfig (& tls.Config {ServerName : hostBad , InsecureSkipVerify : true }).
186
188
GET ("/" ).
187
189
WithURL (urlBad ).
@@ -220,6 +222,19 @@ var _ = framework.IngressNginxDescribe("[Flag] enable-ssl-passthrough", func() {
220
222
221
223
ginkgo .It ("should handle known traffic without Host header" , func () {
222
224
for i := 0 ; i < tries ; i ++ {
225
+ f .HTTPTestClientWithTLSConfig (tlsConfig ).
226
+ GET ("/" ).
227
+ WithURL (url ).
228
+ ForceResolve (f .GetNginxIP (), 443 ).
229
+ WithDialContextMiddleware (throttleMiddleware ).
230
+ Expect ().
231
+ Status (http .StatusOK )
232
+ }
233
+ })
234
+
235
+ ginkgo .It ("should handle insecure traffic without Host header" , func () {
236
+ for i := 0 ; i < tries ; i ++ {
237
+ //nolint:gosec // Ignore the gosec error in testing
223
238
f .HTTPTestClientWithTLSConfig (& tls.Config {ServerName : host , InsecureSkipVerify : true }).
224
239
GET ("/" ).
225
240
WithURL (url ).
@@ -245,6 +260,7 @@ var _ = framework.IngressNginxDescribe("[Flag] enable-ssl-passthrough", func() {
245
260
246
261
ginkgo .It ("should handle insecure traffic with Host header" , func () {
247
262
for i := 0 ; i < tries ; i ++ {
263
+ //nolint:gosec // Ignore the gosec error in testing
248
264
f .HTTPTestClientWithTLSConfig (& tls.Config {ServerName : host , InsecureSkipVerify : true }).
249
265
GET ("/" ).
250
266
WithURL (url ).
0 commit comments