added proxy-http-version annotation to override the HTTP/1.1 default connection type to reverse proxy backends

This commit is contained in:
E. Stuart Hicks 2019-07-08 14:32:00 -04:00
parent 1387f7b7eb
commit 3b0c523e49
8 changed files with 54 additions and 3 deletions

View file

@ -437,6 +437,10 @@ type Configuration struct {
// Default: 1
ProxyStreamResponses int `json:"proxy-stream-responses,omitempty"`
// Modifies the HTTP version the proxy uses to interact with the backend.
// http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_http_version
ProxyHTTPVersion string `json:"proxy-http-version"`
// Sets the ipv4 addresses on which the server will accept requests.
BindAddressIpv4 []string `json:"bind-address-ipv4,omitempty"`
@ -715,6 +719,7 @@ func NewDefault() Configuration {
LimitRate: 0,
LimitRateAfter: 0,
ProxyBuffering: "off",
ProxyHTTPVersion: "1.1",
},
UpstreamKeepaliveConnections: 32,
UpstreamKeepaliveTimeout: 60,

View file

@ -927,6 +927,7 @@ func (n *NGINXController) createServers(data []*ingress.Ingress,
RequestBuffering: bdef.ProxyRequestBuffering,
ProxyRedirectFrom: bdef.ProxyRedirectFrom,
ProxyBuffering: bdef.ProxyBuffering,
ProxyHTTPVersion: bdef.ProxyHTTPVersion,
}
defaultCertificate := n.cfg.FakeCertificate