how to set the proxy buffer if web server return large cookie via Set-Cookie
Delta Yeh
delta.yeh at gmail.com
Thu Nov 3 07:51:07 UTC 2011
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 Dounin <mdounin at mdounin.ru>:
> Hello!
>
> On Thu, Nov 03, 2011 at 10:49:52AM +0800, Delta Yeh wrote:
>
>> 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.
>
> 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 Dounin
>
More information about the nginx
mailing list