How to set the proxy buffer if web server return large cookie via Set-Cookie

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

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.

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]:

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs