Skip to content

Commit

Permalink
Fix move nested if statement (#11688)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrErlison authored Jul 26, 2024
1 parent 8a88e62 commit 0e0b366
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions internal/ingress/controller/template/crossplane/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 0e0b366

Please sign in to comment.