dubstep
November 3, 2011, 3:50am
#1
Hi,
According to
http://nginx.org/en/docs/http/ngx_http_core_module.html#large_client_header_buffers ,
for long uri or large cookie from browser, I can use
large_client_header_buffers .
For the large cookie from web server via Set-Cookie, how to set proxy
buffer?
Should I set proxy_buffer_size the same size as
large_client_header_buffers?
Or set the proxy_buffers the same as large_client_header_buffers?
For example, there is a 32k cookie
location / {
large_client_header_buffers 4 32k;
proxy_buffer_size 32k;
proxy_pass …
}
or
location / {
large_client_header_buffers 4 32k;
proxy_buffers 4 32k;
proxy_pass …
}
According to the WIKI, I prefer proxy_buffers directive.
BR,
DeltaY
Delta_Y
November 3, 2011, 8:45am
#2
Hello!
On Thu, Nov 03, 2011 at 10:49:52AM +0800, Delta Y. wrote:
For example, there is a 32k cookie
proxy_buffers 4 32k;
proxy_pass …
}
According to the WIKI, I prefer proxy_buffers directive.
Response headers from upstream have to fit into proxy_buffer_size
buffer. The proxy_buffers directive is used when reading response
body from upstream, not headers.
Maxim D.
Delta_Y
November 3, 2011, 8:52am
#3
So to resolve large cookie issue, the config should be:
location / {
large_client_header_buffers 4 32k;
proxy_buffer_size 32k;
proxy_pass ....
}
For response, default proxy_buffers should be OK for most web
application.
2011/11/3 Maxim D. [email protected] :