From 19a8ffb58e5e512b2b509907fdc25d394a402f57 Mon Sep 17 00:00:00 2001 From: "Mr. Erlison" Date: Fri, 26 Jul 2024 19:56:29 -0300 Subject: [PATCH] Fix move nested if statement --- internal/ingress/controller/template/crossplane/http.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/internal/ingress/controller/template/crossplane/http.go b/internal/ingress/controller/template/crossplane/http.go index 7c5ddb693..b13685881 100644 --- a/internal/ingress/controller/template/crossplane/http.go +++ b/internal/ingress/controller/template/crossplane/http.go @@ -107,9 +107,10 @@ func (c *Template) buildHTTP() { if cfg.HTTP2MaxHeaderSize != "" && cfg.HTTP2MaxFieldSize != "" { httpBlock = append(httpBlock, buildDirective("http2_max_field_size", cfg.HTTP2MaxFieldSize)) httpBlock = append(httpBlock, buildDirective("http2_max_header_size", cfg.HTTP2MaxHeaderSize)) - if cfg.HTTP2MaxRequests > 0 { - httpBlock = append(httpBlock, buildDirective("http2_max_requests", cfg.HTTP2MaxRequests)) - } + } + + if cfg.HTTP2MaxRequests > 0 { + httpBlock = append(httpBlock, buildDirective("http2_max_requests", cfg.HTTP2MaxRequests)) } if cfg.UseGzip {