Mercurial > hg > nginx-site
diff xml/en/docs/http/ngx_http_proxy_module.xml @ 506:657848837328
Documented how nginx processes proxied server's response header fields
(X-Accel-*, Expires, Cache-Control, Set-Cookie) that can be ignored.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Tue, 24 Apr 2012 07:32:41 +0000 |
parents | 695f83494c19 |
children | 5e332fafd228 |
line wrap: on
line diff
--- a/xml/en/docs/http/ngx_http_proxy_module.xml +++ b/xml/en/docs/http/ngx_http_proxy_module.xml @@ -82,6 +82,14 @@ The maximum size of the data that nginx at a time is set by the <link id="proxy_buffer_size"/> directive. </para> +<para> +Buffering can also be enabled or disabled by passing +“<literal>yes</literal>” or “<literal>no</literal>” in the +<header>X-Accel-Buffering</header> response header field. +This ability can be disabled using the +<link doc="ngx_http_proxy_module.xml" id="proxy_ignore_headers"/> directive. +</para> + </directive> @@ -368,6 +376,24 @@ proxy_cache_valid any 1m; </example> </para> +<para> +Parameters of caching can also be set directly +in the response header. +This has a higher precedence than setting of caching time using the directive. +The <header>X-Accel-Expires</header> header field sets caching time of a +response in seconds. +The value 0 disables to cache a response. +If a value starts with the prefix <literal>@</literal>, it sets an absolute +time in seconds since Epoch, up to which the response may be cached. +If header does not include the <header>X-Accel-Expires</header> field, +parameters of caching may be set in the header fields +<header>Expires</header> or <header>Cache-Control</header>. +If a header includes the <header>Set-Cookie</header> field, such a +response will not be cached. +Processing of one or more of these response header fields can be disabled +using the <link id="proxy_ignore_headers"/> directive. +</para> + </directive> @@ -596,6 +622,42 @@ The following fields can be ignored: <he <header>Cache-Control</header>, and <header>Set-Cookie</header> (0.8.44). </para> +<para> +If not disabled, processing of these header fields has the following effect: +<list type="bullet" compact="no"> + +<listitem> +<header>X-Accel-Expires</header>, <header>Expires</header>, +<header>Cache-Control</header>, and <header>Set-Cookie</header> +set parameters of response <link id="proxy_cache_valid">caching</link>; +</listitem> + +<listitem> +<header>X-Accel-Redirect</header> performs an +<link doc="ngx_http_core_module.xml" id="internal">internal +redirect</link> to the specified URI; +</listitem> + +<listitem> +<header>X-Accel-Limit-Rate</header> sets a +<link doc="ngx_http_core_module.xml" id="limit_rate">rate +limit</link> for transmission of a response to a client; +</listitem> + +<listitem> +<header>X-Accel-Buffering</header> enables or disables +<link id="proxy_buffering">buffering</link> of a response; +</listitem> + +<listitem> +<header>X-Accel-Charset</header> sets the desired +<link doc="ngx_http_charset_module.xml" id="charset"/> +of a response. +</listitem> + +</list> +</para> + </directive>