Mercurial > hg > nginx-site
comparison 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 |
comparison
equal
deleted
inserted
replaced
505:837bcf62b628 | 506:657848837328 |
---|---|
78 When buffering is disabled, a response is passed to a client synchronously, | 78 When buffering is disabled, a response is passed to a client synchronously, |
79 immediately as it is received. | 79 immediately as it is received. |
80 nginx will not try to read the whole response from the proxied server. | 80 nginx will not try to read the whole response from the proxied server. |
81 The maximum size of the data that nginx can receive from the server | 81 The maximum size of the data that nginx can receive from the server |
82 at a time is set by the <link id="proxy_buffer_size"/> directive. | 82 at a time is set by the <link id="proxy_buffer_size"/> directive. |
83 </para> | |
84 | |
85 <para> | |
86 Buffering can also be enabled or disabled by passing | |
87 “<literal>yes</literal>” or “<literal>no</literal>” in the | |
88 <header>X-Accel-Buffering</header> response header field. | |
89 This ability can be disabled using the | |
90 <link doc="ngx_http_proxy_module.xml" id="proxy_ignore_headers"/> directive. | |
83 </para> | 91 </para> |
84 | 92 |
85 </directive> | 93 </directive> |
86 | 94 |
87 | 95 |
366 proxy_cache_valid 301 1h; | 374 proxy_cache_valid 301 1h; |
367 proxy_cache_valid any 1m; | 375 proxy_cache_valid any 1m; |
368 </example> | 376 </example> |
369 </para> | 377 </para> |
370 | 378 |
379 <para> | |
380 Parameters of caching can also be set directly | |
381 in the response header. | |
382 This has a higher precedence than setting of caching time using the directive. | |
383 The <header>X-Accel-Expires</header> header field sets caching time of a | |
384 response in seconds. | |
385 The value 0 disables to cache a response. | |
386 If a value starts with the prefix <literal>@</literal>, it sets an absolute | |
387 time in seconds since Epoch, up to which the response may be cached. | |
388 If header does not include the <header>X-Accel-Expires</header> field, | |
389 parameters of caching may be set in the header fields | |
390 <header>Expires</header> or <header>Cache-Control</header>. | |
391 If a header includes the <header>Set-Cookie</header> field, such a | |
392 response will not be cached. | |
393 Processing of one or more of these response header fields can be disabled | |
394 using the <link id="proxy_ignore_headers"/> directive. | |
395 </para> | |
396 | |
371 </directive> | 397 </directive> |
372 | 398 |
373 | 399 |
374 <directive name="proxy_connect_timeout"> | 400 <directive name="proxy_connect_timeout"> |
375 <syntax><value>time</value></syntax> | 401 <syntax><value>time</value></syntax> |
592 The following fields can be ignored: <header>X-Accel-Redirect</header>, | 618 The following fields can be ignored: <header>X-Accel-Redirect</header>, |
593 <header>X-Accel-Expires</header>, <header>X-Accel-Limit-Rate</header> (1.1.6), | 619 <header>X-Accel-Expires</header>, <header>X-Accel-Limit-Rate</header> (1.1.6), |
594 <header>X-Accel-Buffering</header> (1.1.6), | 620 <header>X-Accel-Buffering</header> (1.1.6), |
595 <header>X-Accel-Charset</header> (1.1.6), <header>Expires</header>, | 621 <header>X-Accel-Charset</header> (1.1.6), <header>Expires</header>, |
596 <header>Cache-Control</header>, and <header>Set-Cookie</header> (0.8.44). | 622 <header>Cache-Control</header>, and <header>Set-Cookie</header> (0.8.44). |
623 </para> | |
624 | |
625 <para> | |
626 If not disabled, processing of these header fields has the following effect: | |
627 <list type="bullet" compact="no"> | |
628 | |
629 <listitem> | |
630 <header>X-Accel-Expires</header>, <header>Expires</header>, | |
631 <header>Cache-Control</header>, and <header>Set-Cookie</header> | |
632 set parameters of response <link id="proxy_cache_valid">caching</link>; | |
633 </listitem> | |
634 | |
635 <listitem> | |
636 <header>X-Accel-Redirect</header> performs an | |
637 <link doc="ngx_http_core_module.xml" id="internal">internal | |
638 redirect</link> to the specified URI; | |
639 </listitem> | |
640 | |
641 <listitem> | |
642 <header>X-Accel-Limit-Rate</header> sets a | |
643 <link doc="ngx_http_core_module.xml" id="limit_rate">rate | |
644 limit</link> for transmission of a response to a client; | |
645 </listitem> | |
646 | |
647 <listitem> | |
648 <header>X-Accel-Buffering</header> enables or disables | |
649 <link id="proxy_buffering">buffering</link> of a response; | |
650 </listitem> | |
651 | |
652 <listitem> | |
653 <header>X-Accel-Charset</header> sets the desired | |
654 <link doc="ngx_http_charset_module.xml" id="charset"/> | |
655 of a response. | |
656 </listitem> | |
657 | |
658 </list> | |
597 </para> | 659 </para> |
598 | 660 |
599 </directive> | 661 </directive> |
600 | 662 |
601 | 663 |