Fix move nested if statement (#11688)
This commit is contained in:
parent
52e66af219
commit
f9108064c4
1 changed files with 4 additions and 3 deletions
|
@ -107,10 +107,11 @@ func (c *Template) buildHTTP() {
|
||||||
if cfg.HTTP2MaxHeaderSize != "" && cfg.HTTP2MaxFieldSize != "" {
|
if cfg.HTTP2MaxHeaderSize != "" && cfg.HTTP2MaxFieldSize != "" {
|
||||||
httpBlock = append(httpBlock, buildDirective("http2_max_field_size", cfg.HTTP2MaxFieldSize))
|
httpBlock = append(httpBlock, buildDirective("http2_max_field_size", cfg.HTTP2MaxFieldSize))
|
||||||
httpBlock = append(httpBlock, buildDirective("http2_max_header_size", cfg.HTTP2MaxHeaderSize))
|
httpBlock = append(httpBlock, buildDirective("http2_max_header_size", cfg.HTTP2MaxHeaderSize))
|
||||||
|
}
|
||||||
|
|
||||||
if cfg.HTTP2MaxRequests > 0 {
|
if cfg.HTTP2MaxRequests > 0 {
|
||||||
httpBlock = append(httpBlock, buildDirective("http2_max_requests", cfg.HTTP2MaxRequests))
|
httpBlock = append(httpBlock, buildDirective("http2_max_requests", cfg.HTTP2MaxRequests))
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if cfg.UseGzip {
|
if cfg.UseGzip {
|
||||||
httpBlock = append(httpBlock, buildDirective("gzip", "on"))
|
httpBlock = append(httpBlock, buildDirective("gzip", "on"))
|
||||||
|
|
Loading…
Reference in a new issue