Mercurial > hg > nginx-site
annotate xml/en/docs/http/ngx_http_headers_module.xml @ 2091:fe66463d0799
Updated OpenSSL version used for win32 builds.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Wed, 27 Dec 2017 22:01:58 +0300 |
parents | d2969b2f69ae |
children | 6ca49554d5fe |
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" |
2039
d2969b2f69ae
Added history notes about codes 201, 307, and 308.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2002
diff
changeset
|
13 rev="10"> |
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 |
2039
d2969b2f69ae
Added history notes about codes 201, 307, and 308.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2002
diff
changeset
|
58 the response code equals 200, 201 (1.3.10), 204, 206, 301, 302, 303, 304, |
d2969b2f69ae
Added history notes about codes 201, 307, and 308.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2002
diff
changeset
|
59 307 (1.1.16, 1.0.13), or 308 (1.13.0). |
2001
1ece24f10f2a
Corrected article in add_header.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1964
diff
changeset
|
60 The value can contain variables. |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
61 </para> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
62 |
1060
b841fbb8c577
Clarified add_header inheritance.
Maxim Dounin <mdounin@mdounin.ru>
parents:
966
diff
changeset
|
63 <para> |
b841fbb8c577
Clarified add_header inheritance.
Maxim Dounin <mdounin@mdounin.ru>
parents:
966
diff
changeset
|
64 There could be several <literal>add_header</literal> directives. |
b841fbb8c577
Clarified add_header inheritance.
Maxim Dounin <mdounin@mdounin.ru>
parents:
966
diff
changeset
|
65 These directives are inherited from the previous level if and |
b841fbb8c577
Clarified add_header inheritance.
Maxim Dounin <mdounin@mdounin.ru>
parents:
966
diff
changeset
|
66 only if there are no |
b841fbb8c577
Clarified add_header inheritance.
Maxim Dounin <mdounin@mdounin.ru>
parents:
966
diff
changeset
|
67 <literal>add_header</literal> |
b841fbb8c577
Clarified add_header inheritance.
Maxim Dounin <mdounin@mdounin.ru>
parents:
966
diff
changeset
|
68 directives defined on the current level. |
b841fbb8c577
Clarified add_header inheritance.
Maxim Dounin <mdounin@mdounin.ru>
parents:
966
diff
changeset
|
69 </para> |
b841fbb8c577
Clarified add_header inheritance.
Maxim Dounin <mdounin@mdounin.ru>
parents:
966
diff
changeset
|
70 |
1291
d7740f42b00a
Headers: documented the "always" parameter of the "add_header" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1060
diff
changeset
|
71 <para> |
d7740f42b00a
Headers: documented the "always" parameter of the "add_header" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1060
diff
changeset
|
72 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
|
73 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
|
74 </para> |
d7740f42b00a
Headers: documented the "always" parameter of the "add_header" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1060
diff
changeset
|
75 |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
76 </directive> |
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 |
2002
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2001
diff
changeset
|
79 <directive name="add_trailer"> |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2001
diff
changeset
|
80 <syntax> |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2001
diff
changeset
|
81 <value>name</value> <value>value</value> |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2001
diff
changeset
|
82 [<literal>always</literal>]</syntax> |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2001
diff
changeset
|
83 <default/> |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2001
diff
changeset
|
84 <context>http</context> |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2001
diff
changeset
|
85 <context>server</context> |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2001
diff
changeset
|
86 <context>location</context> |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2001
diff
changeset
|
87 <context>if in location</context> |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2001
diff
changeset
|
88 <appeared-in>1.13.2</appeared-in> |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2001
diff
changeset
|
89 |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2001
diff
changeset
|
90 <para> |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2001
diff
changeset
|
91 Adds the specified field to the end of a response provided that |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2001
diff
changeset
|
92 the response code equals 200, 201, 206, 301, 302, 303, 307, or 308. |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2001
diff
changeset
|
93 The value can contain variables. |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2001
diff
changeset
|
94 </para> |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2001
diff
changeset
|
95 |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2001
diff
changeset
|
96 <para> |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2001
diff
changeset
|
97 There could be several <literal>add_trailer</literal> directives. |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2001
diff
changeset
|
98 These directives are inherited from the previous level if and |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2001
diff
changeset
|
99 only if there are no |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2001
diff
changeset
|
100 <literal>add_trailer</literal> |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2001
diff
changeset
|
101 directives defined on the current level. |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2001
diff
changeset
|
102 </para> |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2001
diff
changeset
|
103 |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2001
diff
changeset
|
104 <para> |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2001
diff
changeset
|
105 If the <literal>always</literal> parameter is specified |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2001
diff
changeset
|
106 the specified field will be added regardless of the response code. |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2001
diff
changeset
|
107 </para> |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2001
diff
changeset
|
108 |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2001
diff
changeset
|
109 </directive> |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2001
diff
changeset
|
110 |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2001
diff
changeset
|
111 |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
112 <directive name="expires"> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
113 <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
|
114 <syntax> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
115 <literal>epoch</literal> | |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
116 <literal>max</literal> | |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
117 <literal>off</literal></syntax> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
118 <default>off</default> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
119 <context>http</context> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
120 <context>server</context> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
121 <context>location</context> |
686
f368bff5c70a
Documented missing contexts in the http_headers module.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
122 <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
|
123 |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
124 <para> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
125 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
|
126 and <header>Cache-Control</header> response header fields provided that |
2039
d2969b2f69ae
Added history notes about codes 201, 307, and 308.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2002
diff
changeset
|
127 the response code equals 200, 201 (1.3.10), 204, 206, 301, 302, 303, 304, |
d2969b2f69ae
Added history notes about codes 201, 307, and 308.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2002
diff
changeset
|
128 307 (1.1.16, 1.0.13), or 308 (1.13.0). |
1808
4b6d7686e00f
Corrected articles in the "expires" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1375
diff
changeset
|
129 The parameter can be a positive or negative |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
130 <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
|
131 </para> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
132 |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
133 <para> |
1808
4b6d7686e00f
Corrected articles in the "expires" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1375
diff
changeset
|
134 The time in the <header>Expires</header> field is computed as a sum of the |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
135 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
|
136 If the <literal>modified</literal> parameter is used (0.7.0, 0.6.32) |
1808
4b6d7686e00f
Corrected articles in the "expires" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1375
diff
changeset
|
137 then the time is computed as a sum of the file’s modification time and |
4b6d7686e00f
Corrected articles in the "expires" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1375
diff
changeset
|
138 the <value>time</value> specified in the directive. |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
139 </para> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
140 |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
141 <para> |
1808
4b6d7686e00f
Corrected articles in the "expires" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1375
diff
changeset
|
142 In addition, it is possible to specify a time of day using |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
143 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
|
144 <example> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
145 expires @15h30m; |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
146 </example> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
147 </para> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
148 |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
149 <para> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
150 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
|
151 “<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
|
152 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
|
153 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
|
154 <list type="bullet"> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
155 |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
156 <listitem> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
157 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
|
158 </listitem> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
159 |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
160 <listitem> |
367
f4033b9bc4ec
- Removed unnecessary instances of unbreakable space.
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
161 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
|
162 <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
|
163 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
|
164 </listitem> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
165 |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
166 </list> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
167 </para> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
168 |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
169 <para> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
170 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
|
171 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
|
172 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
|
173 </para> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
174 |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
175 <para> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
176 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
|
177 <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
|
178 header fields. |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
179 </para> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
180 |
1375
ab0ebdd7ddac
Documented variables support in the expires directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1291
diff
changeset
|
181 <para> |
ab0ebdd7ddac
Documented variables support in the expires directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1291
diff
changeset
|
182 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
|
183 <example> |
ab0ebdd7ddac
Documented variables support in the expires directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1291
diff
changeset
|
184 map $sent_http_content_type $expires { |
ab0ebdd7ddac
Documented variables support in the expires directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1291
diff
changeset
|
185 default off; |
ab0ebdd7ddac
Documented variables support in the expires directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1291
diff
changeset
|
186 application/pdf 42d; |
ab0ebdd7ddac
Documented variables support in the expires directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1291
diff
changeset
|
187 ~image/ max; |
ab0ebdd7ddac
Documented variables support in the expires directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1291
diff
changeset
|
188 } |
ab0ebdd7ddac
Documented variables support in the expires directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1291
diff
changeset
|
189 |
ab0ebdd7ddac
Documented variables support in the expires directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1291
diff
changeset
|
190 expires $expires; |
ab0ebdd7ddac
Documented variables support in the expires directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1291
diff
changeset
|
191 </example> |
ab0ebdd7ddac
Documented variables support in the expires directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1291
diff
changeset
|
192 </para> |
ab0ebdd7ddac
Documented variables support in the expires directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1291
diff
changeset
|
193 |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
194 </directive> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
195 |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
196 </section> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
197 |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
198 </module> |