Allow customisation of the nginx proxy_buffer_size directive via ConfigMap
This commit is contained in:
parent
fbff29d1ec
commit
ae1c4503b3
3 changed files with 10 additions and 0 deletions
|
@ -198,6 +198,9 @@ http://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_timeout
|
|||
**proxy-send-timeout:** Sets the timeout in seconds for [transmitting a request to the proxied server](http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_send_timeout). The timeout is set only between two successive write operations, not for the transmission of the whole request.
|
||||
|
||||
|
||||
**proxy-buffer-size:** Sets the size of the buffer used for [reading the first part of the response](http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffer_size) received from the proxied server. This part usually contains a small response header.`
|
||||
|
||||
|
||||
**resolver:** Configures name servers used to [resolve](http://nginx.org/en/docs/http/ngx_http_core_module.html#resolver) names of upstream servers into addresses
|
||||
|
||||
|
||||
|
|
|
@ -252,6 +252,7 @@ http {
|
|||
|
||||
proxy_redirect off;
|
||||
proxy_buffering off;
|
||||
proxy_buffer_size {{ $cfg.proxyBufferSize }};
|
||||
|
||||
proxy_http_version 1.1;
|
||||
|
||||
|
|
|
@ -157,6 +157,11 @@ type Configuration struct {
|
|||
// http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_send_timeout
|
||||
ProxySendTimeout int `structs:"proxy-send-timeout,omitempty"`
|
||||
|
||||
// Sets the size of the buffer used for reading the first part of the response received from the
|
||||
// proxied server. This part usually contains a small response header.
|
||||
// http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffer_size)
|
||||
ProxyBufferSize string `structs:"proxy-buffer-size,omitempty"`
|
||||
|
||||
// Configures name servers used to resolve names of upstream servers into addresses
|
||||
// http://nginx.org/en/docs/http/ngx_http_core_module.html#resolver
|
||||
Resolver string `structs:"resolver,omitempty"`
|
||||
|
@ -275,6 +280,7 @@ func NewDefault() Configuration {
|
|||
ProxyRealIPCIDR: defIPCIDR,
|
||||
ProxyReadTimeout: 60,
|
||||
ProxySendTimeout: 60,
|
||||
ProxyBufferSize: "4k",
|
||||
ServerNameHashMaxSize: 512,
|
||||
ServerNameHashBucketSize: 64,
|
||||
SSLRedirect: true,
|
||||
|
|
Loading…
Reference in a new issue