Merge c61eb33cf8
into 0c6f15e372
This commit is contained in:
commit
9bc2fe71eb
1 changed files with 6 additions and 7 deletions
|
@ -633,8 +633,7 @@ func (ic *GenericController) getBackendServers() ([]*ingress.Backend, []*ingress
|
|||
|
||||
anns := ic.annotations.Extract(ing)
|
||||
|
||||
// setup client-buffer-body-size based on annotations
|
||||
clientBufferBodySizeAnnotation := ic.annotations.ClientBodyBufferSize(ing)
|
||||
var clientBufferBodySizeAnnotation string
|
||||
|
||||
for _, rule := range ing.Spec.Rules {
|
||||
host := rule.Host
|
||||
|
@ -673,6 +672,10 @@ func (ic *GenericController) getBackendServers() ([]*ingress.Backend, []*ingress
|
|||
nginxPath := rootLocation
|
||||
if path.Path != "" {
|
||||
nginxPath = path.Path
|
||||
// setup client-buffer-body-size based on annotations
|
||||
clientBufferBodySizeAnnotation = ic.annotations.ClientBodyBufferSize(ing)
|
||||
} else {
|
||||
clientBufferBodySizeAnnotation = ""
|
||||
}
|
||||
|
||||
addLoc := true
|
||||
|
@ -691,13 +694,13 @@ func (ic *GenericController) getBackendServers() ([]*ingress.Backend, []*ingress
|
|||
loc.Backend = ups.Name
|
||||
loc.Port = ups.Port
|
||||
loc.Service = ups.Service
|
||||
loc.ClientBodyBufferSize = clientBufferBodySizeAnnotation
|
||||
mergeLocationAnnotations(loc, anns)
|
||||
if loc.Redirect.FromToWWW {
|
||||
server.RedirectFromToWWW = true
|
||||
}
|
||||
break
|
||||
}
|
||||
loc.ClientBodyBufferSize = clientBufferBodySizeAnnotation
|
||||
}
|
||||
// is a new location
|
||||
if addLoc {
|
||||
|
@ -1074,9 +1077,6 @@ func (ic *GenericController) createServers(data []interface{},
|
|||
}
|
||||
}
|
||||
|
||||
// setup client-buffer-body-size based on annotations
|
||||
clientBufferBodySizeAnnotation := ic.annotations.ClientBodyBufferSize(ing)
|
||||
|
||||
for _, rule := range ing.Spec.Rules {
|
||||
host := rule.Host
|
||||
if host == "" {
|
||||
|
@ -1096,7 +1096,6 @@ func (ic *GenericController) createServers(data []interface{},
|
|||
Backend: un,
|
||||
Proxy: ngxProxy,
|
||||
Service: &api.Service{},
|
||||
ClientBodyBufferSize: clientBufferBodySizeAnnotation,
|
||||
},
|
||||
}, SSLPassthrough: sslpt}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue