@@ -83,6 +83,11 @@ type Configuration struct {
83
83
// By default this is enabled
84
84
EnableDynamicTLSRecords bool `json:"enable-dynamic-tls-records"`
85
85
86
+ // ClientHeaderBufferSize allows to configure a custom buffer
87
+ // size for reading client request header
88
+ // http://nginx.org/en/docs/http/ngx_http_core_module.html#client_header_buffer_size
89
+ ClientHeaderBufferSize string `json:"client-header-buffer-size"`
90
+
86
91
// EnableSPDY enables spdy and use ALPN and NPN to advertise the availability of the two protocols
87
92
// https://blog.cloudflare.com/open-sourcing-our-nginx-http-2-spdy-code
88
93
// By default this is enabled
@@ -128,6 +133,12 @@ type Configuration struct {
128
133
// http://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_timeout
129
134
KeepAlive int `json:"keep-alive,omitempty"`
130
135
136
+ // LargeClientHeaderBuffers Sets the maximum number and size of buffers used for reading
137
+ // large client request header.
138
+ // http://nginx.org/en/docs/http/ngx_http_core_module.html#large_client_header_buffers
139
+ // Default: 4 8k
140
+ LargeClientHeaderBuffers string `json:"large-client-header-buffers"`
141
+
131
142
// Maximum number of simultaneous connections that can be opened by each worker process
132
143
// http://nginx.org/en/docs/ngx_core_module.html#worker_connections
133
144
MaxWorkerConnections int `json:"max-worker-connections,omitempty"`
@@ -221,6 +232,7 @@ type Configuration struct {
221
232
// NewDefault returns the default nginx configuration
222
233
func NewDefault () Configuration {
223
234
cfg := Configuration {
235
+ ClientHeaderBufferSize : "1k" ,
224
236
EnableDynamicTLSRecords : true ,
225
237
EnableSPDY : false ,
226
238
ErrorLogLevel : errorLevel ,
@@ -229,6 +241,7 @@ func NewDefault() Configuration {
229
241
HSTSMaxAge : hstsMaxAge ,
230
242
GzipTypes : gzipTypes ,
231
243
KeepAlive : 75 ,
244
+ LargeClientHeaderBuffers : "4 8k" ,
232
245
MaxWorkerConnections : 16384 ,
233
246
MapHashBucketSize : 64 ,
234
247
ProxyRealIPCIDR : defIPCIDR ,
0 commit comments