Mercurial > hg > nginx-site
annotate xml/en/docs/http/ngx_http_headers_module.xml @ 1740:32bbadb5b64c
Corrected language of the "drain" parameter in upstream_conf.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Tue, 05 Jul 2016 16:24:04 +0300 |
parents | ab0ebdd7ddac |
children | 4b6d7686e00f |
rev | line source |
---|---|
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1 <?xml version="1.0"?> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2 |
580
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
427
diff
changeset
|
3 <!-- |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
427
diff
changeset
|
4 Copyright (C) Igor Sysoev |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
427
diff
changeset
|
5 Copyright (C) Nginx, Inc. |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
427
diff
changeset
|
6 --> |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
427
diff
changeset
|
7 |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
9 |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
10 <module name="Module ngx_http_headers_module" |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
11 link="/en/docs/http/ngx_http_headers_module.html" |
589 | 12 lang="en" |
1375
ab0ebdd7ddac
Documented variables support in the expires directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1291
diff
changeset
|
13 rev="7"> |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
14 |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
15 <section id="summary"> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
16 |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
17 <para> |
966 | 18 The <literal>ngx_http_headers_module</literal> module allows adding |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
19 the <header>Expires</header> and <header>Cache-Control</header> header |
966 | 20 fields, and arbitrary fields, to a response header. |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
21 </para> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
22 |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
23 </section> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
24 |
364 | 25 |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
26 <section id="example" name="Example Configuration"> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
27 |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
28 <para> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
29 <example> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
30 expires 24h; |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
31 expires modified +24h; |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
32 expires @24h; |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
33 expires 0; |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
34 expires -1; |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
35 expires epoch; |
1375
ab0ebdd7ddac
Documented variables support in the expires directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1291
diff
changeset
|
36 expires $expires; |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
37 add_header Cache-Control private; |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
38 </example> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
39 </para> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
40 |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
41 </section> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
42 |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
43 |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
44 <section id="directives" name="Directives"> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
45 |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
46 <directive name="add_header"> |
1291
d7740f42b00a
Headers: documented the "always" parameter of the "add_header" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1060
diff
changeset
|
47 <syntax> |
d7740f42b00a
Headers: documented the "always" parameter of the "add_header" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1060
diff
changeset
|
48 <value>name</value> <value>value</value> |
d7740f42b00a
Headers: documented the "always" parameter of the "add_header" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1060
diff
changeset
|
49 [<literal>always</literal>]</syntax> |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
50 <default/> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
51 <context>http</context> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
52 <context>server</context> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
53 <context>location</context> |
686
f368bff5c70a
Documented missing contexts in the http_headers module.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
54 <context>if in location</context> |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
55 |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
56 <para> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
57 Adds the specified field to a response header provided that |
786
b4fc7d571e48
Documented that "add_header" now affects 201 responses.
Ruslan Ermilov <ru@nginx.com>
parents:
770
diff
changeset
|
58 the response code equals 200, 201, 204, 206, 301, 302, 303, 304, or 307. |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
59 A value can contain variables. |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
60 </para> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
61 |
1060
b841fbb8c577
Clarified add_header inheritance.
Maxim Dounin <mdounin@mdounin.ru>
parents:
966
diff
changeset
|
62 <para> |
b841fbb8c577
Clarified add_header inheritance.
Maxim Dounin <mdounin@mdounin.ru>
parents:
966
diff
changeset
|
63 There could be several <literal>add_header</literal> directives. |
b841fbb8c577
Clarified add_header inheritance.
Maxim Dounin <mdounin@mdounin.ru>
parents:
966
diff
changeset
|
64 These directives are inherited from the previous level if and |
b841fbb8c577
Clarified add_header inheritance.
Maxim Dounin <mdounin@mdounin.ru>
parents:
966
diff
changeset
|
65 only if there are no |
b841fbb8c577
Clarified add_header inheritance.
Maxim Dounin <mdounin@mdounin.ru>
parents:
966
diff
changeset
|
66 <literal>add_header</literal> |
b841fbb8c577
Clarified add_header inheritance.
Maxim Dounin <mdounin@mdounin.ru>
parents:
966
diff
changeset
|
67 directives defined on the current level. |
b841fbb8c577
Clarified add_header inheritance.
Maxim Dounin <mdounin@mdounin.ru>
parents:
966
diff
changeset
|
68 </para> |
b841fbb8c577
Clarified add_header inheritance.
Maxim Dounin <mdounin@mdounin.ru>
parents:
966
diff
changeset
|
69 |
1291
d7740f42b00a
Headers: documented the "always" parameter of the "add_header" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1060
diff
changeset
|
70 <para> |
d7740f42b00a
Headers: documented the "always" parameter of the "add_header" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1060
diff
changeset
|
71 If the <literal>always</literal> parameter is specified (1.7.5), |
d7740f42b00a
Headers: documented the "always" parameter of the "add_header" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1060
diff
changeset
|
72 the header field will be added regardless of the response code. |
d7740f42b00a
Headers: documented the "always" parameter of the "add_header" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1060
diff
changeset
|
73 </para> |
d7740f42b00a
Headers: documented the "always" parameter of the "add_header" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1060
diff
changeset
|
74 |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
75 </directive> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
76 |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
77 |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
78 <directive name="expires"> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
79 <syntax>[<literal>modified</literal>] <value>time</value></syntax> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
80 <syntax> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
81 <literal>epoch</literal> | |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
82 <literal>max</literal> | |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
83 <literal>off</literal></syntax> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
84 <default>off</default> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
85 <context>http</context> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
86 <context>server</context> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
87 <context>location</context> |
686
f368bff5c70a
Documented missing contexts in the http_headers module.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
88 <context>if in location</context> |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
89 |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
90 <para> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
91 Enables or disables adding or modifying the <header>Expires</header> |
770
a879f261f3db
Reduced unnecessary diffs between "add_header" and "expires" texts.
Ruslan Ermilov <ru@nginx.com>
parents:
762
diff
changeset
|
92 and <header>Cache-Control</header> response header fields provided that |
786
b4fc7d571e48
Documented that "add_header" now affects 201 responses.
Ruslan Ermilov <ru@nginx.com>
parents:
770
diff
changeset
|
93 the response code equals 200, 201, 204, 206, 301, 302, 303, 304, or 307. |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
94 A parameter can be a positive or negative |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
95 <link doc="../syntax.xml">time</link>. |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
96 </para> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
97 |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
98 <para> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
99 A time in the <header>Expires</header> field is computed as a sum of the |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
100 current time and <value>time</value> specified in the directive. |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
101 If the <literal>modified</literal> parameter is used (0.7.0, 0.6.32) |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
102 then time is computed as a sum of the file’s modification time and |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
103 <value>time</value> specified in the directive. |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
104 </para> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
105 |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
106 <para> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
107 In addition, it is possible to specify a time of the day using |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
108 the “<literal>@</literal>” prefix (0.7.9, 0.6.34): |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
109 <example> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
110 expires @15h30m; |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
111 </example> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
112 </para> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
113 |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
114 <para> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
115 The <literal>epoch</literal> parameter corresponds to the absolute time |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
116 “<literal>Thu, 01 Jan 1970 00:00:01 GMT</literal>”. |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
117 The contents of the <header>Cache-Control</header> field depends |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
118 on the sign of the specified time: |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
119 <list type="bullet"> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
120 |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
121 <listitem> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
122 time is negative — <header>Cache-Control: no-cache</header>. |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
123 </listitem> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
124 |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
125 <listitem> |
367
f4033b9bc4ec
- Removed unnecessary instances of unbreakable space.
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
126 time is positive or zero — |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
127 <header>Cache-Control: max-age=<value>t</value></header>, |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
128 where <value>t</value> is a time specified in the directive, in seconds. |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
129 </listitem> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
130 |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
131 </list> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
132 </para> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
133 |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
134 <para> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
135 The <literal>max</literal> parameter sets <header>Expires</header> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
136 to the value “<literal>Thu, 31 Dec 2037 23:55:55 GMT</literal>”, |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
137 and <header>Cache-Control</header> to 10 years. |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
138 </para> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
139 |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
140 <para> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
141 The <literal>off</literal> parameter disables adding or modifying the |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
142 <header>Expires</header> and <header>Cache-Control</header> response |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
143 header fields. |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
144 </para> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
145 |
1375
ab0ebdd7ddac
Documented variables support in the expires directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1291
diff
changeset
|
146 <para> |
ab0ebdd7ddac
Documented variables support in the expires directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1291
diff
changeset
|
147 The last parameter value can contain variables (1.7.9): |
ab0ebdd7ddac
Documented variables support in the expires directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1291
diff
changeset
|
148 <example> |
ab0ebdd7ddac
Documented variables support in the expires directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1291
diff
changeset
|
149 map $sent_http_content_type $expires { |
ab0ebdd7ddac
Documented variables support in the expires directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1291
diff
changeset
|
150 default off; |
ab0ebdd7ddac
Documented variables support in the expires directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1291
diff
changeset
|
151 application/pdf 42d; |
ab0ebdd7ddac
Documented variables support in the expires directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1291
diff
changeset
|
152 ~image/ max; |
ab0ebdd7ddac
Documented variables support in the expires directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1291
diff
changeset
|
153 } |
ab0ebdd7ddac
Documented variables support in the expires directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1291
diff
changeset
|
154 |
ab0ebdd7ddac
Documented variables support in the expires directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1291
diff
changeset
|
155 expires $expires; |
ab0ebdd7ddac
Documented variables support in the expires directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1291
diff
changeset
|
156 </example> |
ab0ebdd7ddac
Documented variables support in the expires directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1291
diff
changeset
|
157 </para> |
ab0ebdd7ddac
Documented variables support in the expires directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1291
diff
changeset
|
158 |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
159 </directive> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
160 |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
161 </section> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
162 |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
163 </module> |