Skip to content

Commit

Permalink
Fix move nested if statement (kubernetes#11688)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrErlison authored and rikatz committed Nov 13, 2024
1 parent 0e7a583 commit bf78158
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 bf78158

Please sign in to comment.