Skip to content

Commit 2cbf257

Browse files
committed
Documented "add_header_inherit", "add_trailer_inherit" directives.
1 parent 7148192 commit 2cbf257

File tree

2 files changed

+172
-6
lines changed

2 files changed

+172
-6
lines changed

xml/en/docs/http/ngx_http_headers_module.xml

Lines changed: 85 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<module name="Module ngx_http_headers_module"
1111
link="/en/docs/http/ngx_http_headers_module.html"
1212
lang="en"
13-
rev="13">
13+
rev="14">
1414

1515
<section id="summary">
1616

@@ -60,11 +60,13 @@ the response code equals 200, 201 (1.3.10), 204, 206, 301, 302, 303, 304,
6060
Parameter value can contain variables.
6161
</para>
6262

63-
<para>
63+
<para id="add_header_default_inherit">
6464
There could be several <literal>add_header</literal> directives.
6565
These directives are inherited from the previous configuration level
6666
if and only if there are no <literal>add_header</literal> directives
6767
defined on the current level.
68+
Inheritance rules can be redefined with the
69+
<link id="add_header_inherit"/> directive (1.29.3).
6870
</para>
6971

7072
<para>
@@ -75,6 +77,45 @@ the header field will be added regardless of the response code.
7577
</directive>
7678

7779

80+
<directive name="add_header_inherit">
81+
<syntax>
82+
<literal>on</literal> |
83+
<literal>off</literal> |
84+
<literal>merge</literal></syntax>
85+
<default>on</default>
86+
<context>http</context>
87+
<context>server</context>
88+
<context>location</context>
89+
<context>if in location</context>
90+
<appeared-in>1.29.3</appeared-in>
91+
92+
<para>
93+
Allows altering inheritance rules for the values specified in the
94+
<link id="add_header"/> directives.
95+
By default, the
96+
<link id="add_header_default_inherit">standard</link> inheritance model is used.
97+
</para>
98+
99+
<para>
100+
The <literal>merge</literal> parameter enables appending values
101+
from the previous level to the values defined at the current level.
102+
</para>
103+
104+
<para>
105+
The <literal>off</literal> parameter cancels inheritance of the values
106+
from the previous configuration level.
107+
</para>
108+
109+
<para>
110+
The inheritance rules themselves are inherited in a standard way.
111+
For example, <literal>add_header_inherit merge;</literal>
112+
specified at the top level will
113+
be inherited in all nested levels recursively unless redefined later.
114+
</para>
115+
116+
</directive>
117+
118+
78119
<directive name="add_trailer">
79120
<syntax>
80121
<value>name</value> <value>value</value>
@@ -92,11 +133,13 @@ the response code equals 200, 201, 206, 301, 302, 303, 307, or 308.
92133
Parameter value can contain variables.
93134
</para>
94135

95-
<para>
136+
<para id="add_trailer_default_inherit">
96137
There could be several <literal>add_trailer</literal> directives.
97138
These directives are inherited from the previous configuration level
98139
if and only if there are no <literal>add_trailer</literal> directives
99140
defined on the current level.
141+
Inheritance rules can be redefined with the
142+
<link id="add_trailer_inherit"/> directive (1.29.3).
100143
</para>
101144

102145
<para>
@@ -107,6 +150,45 @@ the specified field will be added regardless of the response code.
107150
</directive>
108151

109152

153+
<directive name="add_trailer_inherit">
154+
<syntax>
155+
<literal>on</literal> |
156+
<literal>off</literal> |
157+
<literal>merge</literal></syntax>
158+
<default>on</default>
159+
<context>http</context>
160+
<context>server</context>
161+
<context>location</context>
162+
<context>if in location</context>
163+
<appeared-in>1.29.3</appeared-in>
164+
165+
<para>
166+
Allows altering inheritance rules for the values specified in the
167+
<link id="add_trailer"/> directives.
168+
By default, the
169+
<link id="add_trailer_default_inherit">standard</link> inheritance model is used.
170+
</para>
171+
172+
<para>
173+
The <literal>merge</literal> parameter enables appending values
174+
from the previous level to the values defined at the current level.
175+
</para>
176+
177+
<para>
178+
The <literal>off</literal> parameter cancels inheritance of the values
179+
from the previous configuration level.
180+
</para>
181+
182+
<para>
183+
The inheritance rules themselves are inherited in a standard way.
184+
For example, <literal>add_trailer_inherit merge;</literal>
185+
specified at the top level will
186+
be inherited in all nested levels recursively unless redefined later.
187+
</para>
188+
189+
</directive>
190+
191+
110192
<directive name="expires">
111193
<syntax>[<literal>modified</literal>] <value>time</value></syntax>
112194
<syntax>

xml/ru/docs/http/ngx_http_headers_module.xml

Lines changed: 87 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<module name="Модуль ngx_http_headers_module"
1111
link="/ru/docs/http/ngx_http_headers_module.html"
1212
lang="ru"
13-
rev="13">
13+
rev="14">
1414

1515
<section id="summary">
1616

@@ -60,10 +60,12 @@ add_header Cache-Control private;
6060
В значении параметра можно использовать переменные.
6161
</para>
6262

63-
<para>
63+
<para id="add_header_default_inherit">
6464
Директив <literal>add_header</literal> может быть несколько.
6565
Директивы наследуются с предыдущего уровня конфигурации при условии, что
6666
на данном уровне не описаны свои директивы <literal>add_header</literal>.
67+
Правила наследования могут быть переопределены при помощи
68+
директивы <link id="add_header_inherit"/> (1.29.3).
6769
</para>
6870

6971
<para>
@@ -74,6 +76,46 @@ add_header Cache-Control private;
7476
</directive>
7577

7678

79+
<directive name="add_header_inherit">
80+
<syntax>
81+
<literal>on</literal> |
82+
<literal>off</literal> |
83+
<literal>merge</literal></syntax>
84+
<default>on</default>
85+
<context>http</context>
86+
<context>server</context>
87+
<context>location</context>
88+
<context>if in location</context>
89+
<appeared-in>1.29.3</appeared-in>
90+
91+
<para>
92+
Позволяет изменять правила наследования значений, указанных в
93+
директивах <link id="add_header"/>.
94+
По умолчанию используется
95+
<link id="add_header_default_inherit">стандартная</link> модель наследования.
96+
</para>
97+
98+
<para>
99+
Параметр <literal>merge</literal> включает добавление значений
100+
с предыдущего уровня к значениям, указанным на текущем уровне.
101+
</para>
102+
103+
<para>
104+
Параметр <literal>off</literal> отменяет наследование значений
105+
с предыдущего уровня конфигурации.
106+
</para>
107+
108+
<para>
109+
Сами правила наследования также наследуются стандартным образом.
110+
Например <literal>add_header_inherit merge;</literal>,
111+
определённый на верхнем уровне,
112+
будет рекурсивно наследоваться во всех вложенных уровнях
113+
до тех пор, пока не будет переопределён.
114+
</para>
115+
116+
</directive>
117+
118+
77119
<directive name="add_trailer">
78120
<syntax>
79121
<value>имя</value> <value>значение</value>
@@ -91,10 +133,12 @@ add_header Cache-Control private;
91133
В значении можно использовать переменные.
92134
</para>
93135

94-
<para>
136+
<para id="add_trailer_default_inherit">
95137
Директив <literal>add_trailer</literal> может быть несколько.
96138
Директивы наследуются с предыдущего уровня конфигурации при условии, что
97139
на данном уровне не описаны свои директивы <literal>add_trailer</literal>.
140+
Правила наследования могут быть переопределены при помощи
141+
директивы <link id="add_trailer_inherit"/> (1.29.3).
98142
</para>
99143

100144
<para>
@@ -105,6 +149,46 @@ add_header Cache-Control private;
105149
</directive>
106150

107151

152+
<directive name="add_trailer_inherit">
153+
<syntax>
154+
<literal>on</literal> |
155+
<literal>off</literal> |
156+
<literal>merge</literal></syntax>
157+
<default>on</default>
158+
<context>http</context>
159+
<context>server</context>
160+
<context>location</context>
161+
<context>if in location</context>
162+
<appeared-in>1.29.3</appeared-in>
163+
164+
<para>
165+
Позволяет изменять правила наследования значений, указанных в
166+
директивах <link id="add_trailer"/>.
167+
По умолчанию используется
168+
<link id="add_trailer_default_inherit">стандартная</link> модель наследования.
169+
</para>
170+
171+
<para>
172+
Параметр <literal>merge</literal> включает добавление значений
173+
с предыдущего уровня к значениям, указанным на текущем уровне.
174+
</para>
175+
176+
<para>
177+
Параметр <literal>off</literal> отменяет наследование значений
178+
с предыдущего уровня конфигурации.
179+
</para>
180+
181+
<para>
182+
Сами правила наследования также наследуются стандартным образом.
183+
Например <literal>add_trailer_inherit merge;</literal>,
184+
определённый на верхнем уровне,
185+
будет рекурсивно наследоваться во всех вложенных уровнях
186+
до тех пор, пока не будет переопределён.
187+
</para>
188+
189+
</directive>
190+
191+
108192
<directive name="expires">
109193
<syntax>[<literal>modified</literal>] <value>время</value></syntax>
110194
<syntax>

0 commit comments

Comments
 (0)