diff --git a/rootfs/etc/nginx/template/nginx.tmpl b/rootfs/etc/nginx/template/nginx.tmpl index 739748c7ac..388d8f5d0e 100755 --- a/rootfs/etc/nginx/template/nginx.tmpl +++ b/rootfs/etc/nginx/template/nginx.tmpl @@ -473,7 +473,7 @@ http { ssl_certificate {{ $cfg.DefaultSSLCertificate.PemFileName }}; ssl_certificate_key {{ $cfg.DefaultSSLCertificate.PemFileName }}; - {{ if and (gt (len $cfg.CustomHTTPErrors) 0) (not $cfg.ProxyInterceptErrors) }} + {{ if and $cfg.CustomHTTPErrors (not $cfg.DisableProxyInterceptErrors) }} proxy_intercept_errors on; {{ end }} diff --git a/test/e2e/annotations/disableproxyintercepterrors.go b/test/e2e/annotations/disableproxyintercepterrors.go index 1ed16136bd..77c89e95e5 100644 --- a/test/e2e/annotations/disableproxyintercepterrors.go +++ b/test/e2e/annotations/disableproxyintercepterrors.go @@ -51,7 +51,7 @@ var _ = framework.DescribeAnnotation("disable-proxy-intercept-errors", func() { return strings.Contains(serverConfig, fmt.Sprintf("server_name %s", host)) }) - ginkgo.By("turning on proxy_intercept_errors directive") + ginkgo.By("turning off proxy_intercept_errors directive") assert.NotContains(ginkgo.GinkgoT(), serverConfig, "proxy_intercept_errors on;") })