added proxy-http-version annotation to override the HTTP/1.1 default connection type to reverse proxy backends
This commit is contained in:
parent
1387f7b7eb
commit
3b0c523e49
8 changed files with 54 additions and 3 deletions
|
|
@ -40,6 +40,7 @@ type Config struct {
|
|||
ProxyRedirectTo string `json:"proxyRedirectTo"`
|
||||
RequestBuffering string `json:"requestBuffering"`
|
||||
ProxyBuffering string `json:"proxyBuffering"`
|
||||
ProxyHTTPVersion string `json:"proxyHTTPVersion"`
|
||||
}
|
||||
|
||||
// Equal tests for equality between two Configuration types
|
||||
|
|
@ -95,6 +96,9 @@ func (l1 *Config) Equal(l2 *Config) bool {
|
|||
if l1.ProxyBuffering != l2.ProxyBuffering {
|
||||
return false
|
||||
}
|
||||
if l1.ProxyHTTPVersion != l2.ProxyHTTPVersion {
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
|
@ -191,5 +195,10 @@ func (a proxy) Parse(ing *networking.Ingress) (interface{}, error) {
|
|||
config.ProxyBuffering = defBackend.ProxyBuffering
|
||||
}
|
||||
|
||||
config.ProxyHTTPVersion, err = parser.GetStringAnnotation("proxy-http-version", ing)
|
||||
if err != nil {
|
||||
config.ProxyHTTPVersion = defBackend.ProxyHTTPVersion
|
||||
}
|
||||
|
||||
return config, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue