Mercurial > hg > nginx-site
annotate xml/ru/docs/http/ngx_http_headers_module.xml @ 2697:a45ba3a1d999
Corrected description of js_var for stream.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Tue, 30 Mar 2021 15:39:14 +0100 |
parents | eeed494bba51 |
children |
rev | line source |
---|---|
222
bfe3eff81d04
Removed redundant encoding specification.
Ruslan Ermilov <ru@nginx.com>
parents:
110
diff
changeset
|
1 <?xml version="1.0"?> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
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 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
9 |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
10 <module name="Модуль ngx_http_headers_module" |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
11 link="/ru/docs/http/ngx_http_headers_module.html" |
589 | 12 lang="ru" |
2593
eeed494bba51
Unified phrases about configuration levels and inheritance.
Ruslan Ermilov <ru@nginx.com>
parents:
2391
diff
changeset
|
13 rev="13"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
14 |
110
40eec261c2a6
Added proper support for anonymous sections, notably for the summary.
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
15 <section id="summary"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
16 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
17 <para> |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
18 Модуль <literal>ngx_http_headers_module</literal> позволяет выдавать |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
19 поля заголовка <header>Expires</header> и <header>Cache-Control</header>, |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
20 а также добавлять произвольные поля в заголовок ответа. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
21 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
22 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
23 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
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:
271
diff
changeset
|
26 <section id="example" name="Пример конфигурации"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
27 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
28 <para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
29 <example> |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
30 expires 24h; |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
31 expires modified +24h; |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
32 expires @24h; |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
33 expires 0; |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
34 expires -1; |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
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:
271
diff
changeset
|
37 add_header Cache-Control private; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
38 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
39 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
40 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
41 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
42 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
43 |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
44 <section id="directives" name="Директивы"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
45 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
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>имя</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> |
99
1d315ef37215
The case <default/> is now language-agnostic.
Ruslan Ermilov <ru@nginx.com>
parents:
76
diff
changeset
|
50 <default/> |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
51 <context>http</context> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
52 <context>server</context> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
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 в location</context> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
55 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
56 <para> |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
57 Добавляет указанное поле в заголовок ответа при условии, что код ответа |
2039
d2969b2f69ae
Added history notes about codes 201, 307, and 308.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2002
diff
changeset
|
58 равен 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) или 308 (1.13.0). |
2391
375a3dfde23b
Unified phrase "Parameter value can contain variables".
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2311
diff
changeset
|
60 В значении параметра можно использовать переменные. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
61 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
62 |
1060
b841fbb8c577
Clarified add_header inheritance.
Maxim Dounin <mdounin@mdounin.ru>
parents:
786
diff
changeset
|
63 <para> |
b841fbb8c577
Clarified add_header inheritance.
Maxim Dounin <mdounin@mdounin.ru>
parents:
786
diff
changeset
|
64 Директив <literal>add_header</literal> может быть несколько. |
2593
eeed494bba51
Unified phrases about configuration levels and inheritance.
Ruslan Ermilov <ru@nginx.com>
parents:
2391
diff
changeset
|
65 Директивы наследуются с предыдущего уровня конфигурации при условии, что |
eeed494bba51
Unified phrases about configuration levels and inheritance.
Ruslan Ermilov <ru@nginx.com>
parents:
2391
diff
changeset
|
66 на данном уровне не описаны свои директивы <literal>add_header</literal>. |
1060
b841fbb8c577
Clarified add_header inheritance.
Maxim Dounin <mdounin@mdounin.ru>
parents:
786
diff
changeset
|
67 </para> |
b841fbb8c577
Clarified add_header inheritance.
Maxim Dounin <mdounin@mdounin.ru>
parents:
786
diff
changeset
|
68 |
1291
d7740f42b00a
Headers: documented the "always" parameter of the "add_header" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1060
diff
changeset
|
69 <para> |
d7740f42b00a
Headers: documented the "always" parameter of the "add_header" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1060
diff
changeset
|
70 Если указан параметр <literal>always</literal> (1.7.5), |
d7740f42b00a
Headers: documented the "always" parameter of the "add_header" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1060
diff
changeset
|
71 то поле заголовка будет добавлено независимо от кода ответа. |
d7740f42b00a
Headers: documented the "always" parameter of the "add_header" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1060
diff
changeset
|
72 </para> |
d7740f42b00a
Headers: documented the "always" parameter of the "add_header" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1060
diff
changeset
|
73 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
74 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
75 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
76 |
2002
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1964
diff
changeset
|
77 <directive name="add_trailer"> |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1964
diff
changeset
|
78 <syntax> |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1964
diff
changeset
|
79 <value>имя</value> <value>значение</value> |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1964
diff
changeset
|
80 [<literal>always</literal>]</syntax> |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1964
diff
changeset
|
81 <default/> |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1964
diff
changeset
|
82 <context>http</context> |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1964
diff
changeset
|
83 <context>server</context> |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1964
diff
changeset
|
84 <context>location</context> |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1964
diff
changeset
|
85 <context>if в location</context> |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1964
diff
changeset
|
86 <appeared-in>1.13.2</appeared-in> |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1964
diff
changeset
|
87 |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1964
diff
changeset
|
88 <para> |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1964
diff
changeset
|
89 Добавляет указанное поле в конец ответа при условии, что код ответа |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1964
diff
changeset
|
90 равен 200, 201, 206, 301, 302, 303, 307 или 308. |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1964
diff
changeset
|
91 В значении можно использовать переменные. |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1964
diff
changeset
|
92 </para> |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1964
diff
changeset
|
93 |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1964
diff
changeset
|
94 <para> |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1964
diff
changeset
|
95 Директив <literal>add_trailer</literal> может быть несколько. |
2593
eeed494bba51
Unified phrases about configuration levels and inheritance.
Ruslan Ermilov <ru@nginx.com>
parents:
2391
diff
changeset
|
96 Директивы наследуются с предыдущего уровня конфигурации при условии, что |
eeed494bba51
Unified phrases about configuration levels and inheritance.
Ruslan Ermilov <ru@nginx.com>
parents:
2391
diff
changeset
|
97 на данном уровне не описаны свои директивы <literal>add_trailer</literal>. |
2002
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1964
diff
changeset
|
98 </para> |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1964
diff
changeset
|
99 |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1964
diff
changeset
|
100 <para> |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1964
diff
changeset
|
101 Если указан параметр <literal>always</literal>, |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1964
diff
changeset
|
102 то указанное поле будет добавлено независимо от кода ответа. |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1964
diff
changeset
|
103 </para> |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1964
diff
changeset
|
104 |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1964
diff
changeset
|
105 </directive> |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1964
diff
changeset
|
106 |
e1f0ef8cff5e
Documented the "add_trailer" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1964
diff
changeset
|
107 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
108 <directive name="expires"> |
271 | 109 <syntax>[<literal>modified</literal>] <value>время</value></syntax> |
110 <syntax> | |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
111 <literal>epoch</literal> | |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
112 <literal>max</literal> | |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
113 <literal>off</literal></syntax> |
102
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
114 <default>off</default> |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
115 <context>http</context> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
116 <context>server</context> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
117 <context>location</context> |
686
f368bff5c70a
Documented missing contexts in the http_headers module.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
118 <context>if в location</context> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
119 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
120 <para> |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
121 Разрешает или запрещает добавлять или менять поля <header>Expires</header> |
770
a879f261f3db
Reduced unnecessary diffs between "add_header" and "expires" texts.
Ruslan Ermilov <ru@nginx.com>
parents:
762
diff
changeset
|
122 и <header>Cache-Control</header> в заголовке ответа при условии, что код ответа |
2039
d2969b2f69ae
Added history notes about codes 201, 307, and 308.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2002
diff
changeset
|
123 равен 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
|
124 307 (1.1.16, 1.0.13) или 308 (1.13.0). |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
125 В качестве параметра можно задать положительное или отрицательное |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
126 <link doc="../syntax.xml">время</link>. |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
127 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
128 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
129 <para> |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
130 Время в поле <header>Expires</header> получается как сумма текущего времени |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
131 и времени, заданного в директиве. |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
132 Если используется параметр <literal>modified</literal> (0.7.0, 0.6.32), |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
133 то время получается как сумма |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
134 времени модификации файла и времени, заданного в директиве. |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
135 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
136 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
137 <para> |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
138 Кроме того, с помощью префикса “<literal>@</literal>” можно задать |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
139 время суток (0.7.9, 0.6.34): |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
140 <example> |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
141 expires @15h30m; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
142 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
143 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
144 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
145 <para> |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
146 Содержимое поля <header>Cache-Control</header> зависит от знака |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
147 заданного времени: |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
148 <list type="bullet"> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
149 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
150 <listitem> |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
151 отрицательное время — <header>Cache-Control: no-cache</header>. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
152 </listitem> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
153 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
154 <listitem> |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
155 положительное или равное нулю время — |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
156 <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:
271
diff
changeset
|
157 где <value>t</value> это время в секундах, заданное в директиве. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
158 </listitem> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
159 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
160 </list> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
161 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
162 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
163 <para> |
2311
6ca49554d5fe
Documented how "expires epoch" affects Cache-Control.
Ruslan Ermilov <ru@nginx.com>
parents:
2039
diff
changeset
|
164 Параметр <literal>epoch</literal> задаёт время |
6ca49554d5fe
Documented how "expires epoch" affects Cache-Control.
Ruslan Ermilov <ru@nginx.com>
parents:
2039
diff
changeset
|
165 “<literal>Thu, 01 Jan 1970 00:00:01 GMT</literal>” |
6ca49554d5fe
Documented how "expires epoch" affects Cache-Control.
Ruslan Ermilov <ru@nginx.com>
parents:
2039
diff
changeset
|
166 (1 января 1970 00:00:01 GMT) для поля <header>Expires</header> |
6ca49554d5fe
Documented how "expires epoch" affects Cache-Control.
Ruslan Ermilov <ru@nginx.com>
parents:
2039
diff
changeset
|
167 и “<literal>no-cache</literal>” для поля <header>Cache-Control</header>. |
6ca49554d5fe
Documented how "expires epoch" affects Cache-Control.
Ruslan Ermilov <ru@nginx.com>
parents:
2039
diff
changeset
|
168 </para> |
6ca49554d5fe
Documented how "expires epoch" affects Cache-Control.
Ruslan Ermilov <ru@nginx.com>
parents:
2039
diff
changeset
|
169 |
6ca49554d5fe
Documented how "expires epoch" affects Cache-Control.
Ruslan Ermilov <ru@nginx.com>
parents:
2039
diff
changeset
|
170 <para> |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
171 Параметр <literal>max</literal> задаёт время |
364 | 172 “<literal>Thu, 31 Dec 2037 23:55:55 GMT</literal>” |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
173 (31 декабря 2037 23:55:55 GMT) для поля <header>Expires</header> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
174 и 10 лет для поля <header>Cache-Control</header>. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
175 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
176 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
177 <para> |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
178 Параметр <literal>off</literal> запрещает добавлять или менять поля |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
179 <header>Expires</header> и <header>Cache-Control</header> в заголовке ответа. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
180 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
181 |
1375
ab0ebdd7ddac
Documented variables support in the expires directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1291
diff
changeset
|
182 <para> |
ab0ebdd7ddac
Documented variables support in the expires directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1291
diff
changeset
|
183 В значении последнего параметра можно использовать переменные (1.7.9): |
ab0ebdd7ddac
Documented variables support in the expires directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1291
diff
changeset
|
184 <example> |
ab0ebdd7ddac
Documented variables support in the expires directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1291
diff
changeset
|
185 map $sent_http_content_type $expires { |
ab0ebdd7ddac
Documented variables support in the expires directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1291
diff
changeset
|
186 default off; |
ab0ebdd7ddac
Documented variables support in the expires directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1291
diff
changeset
|
187 application/pdf 42d; |
ab0ebdd7ddac
Documented variables support in the expires directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1291
diff
changeset
|
188 ~image/ max; |
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 |
ab0ebdd7ddac
Documented variables support in the expires directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1291
diff
changeset
|
191 expires $expires; |
ab0ebdd7ddac
Documented variables support in the expires directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1291
diff
changeset
|
192 </example> |
ab0ebdd7ddac
Documented variables support in the expires directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1291
diff
changeset
|
193 </para> |
ab0ebdd7ddac
Documented variables support in the expires directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1291
diff
changeset
|
194 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
195 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
196 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
197 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
198 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
199 </module> |