Mercurial > hg > nginx-site
changeset 2002:e1f0ef8cff5e
Documented the "add_trailer" directive.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Tue, 27 Jun 2017 15:13:54 +0300 |
parents | 1ece24f10f2a |
children | be779702663e |
files | xml/en/docs/http/ngx_http_headers_module.xml xml/ru/docs/http/ngx_http_headers_module.xml |
diffstat | 2 files changed, 66 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/xml/en/docs/http/ngx_http_headers_module.xml Tue Jun 27 15:13:39 2017 +0300 +++ b/xml/en/docs/http/ngx_http_headers_module.xml Tue Jun 27 15:13:54 2017 +0300 @@ -10,7 +10,7 @@ <module name="Module ngx_http_headers_module" link="/en/docs/http/ngx_http_headers_module.html" lang="en" - rev="8"> + rev="9"> <section id="summary"> @@ -75,6 +75,39 @@ </directive> +<directive name="add_trailer"> +<syntax> +<value>name</value> <value>value</value> +[<literal>always</literal>]</syntax> +<default/> +<context>http</context> +<context>server</context> +<context>location</context> +<context>if in location</context> +<appeared-in>1.13.2</appeared-in> + +<para> +Adds the specified field to the end of a response provided that +the response code equals 200, 201, 206, 301, 302, 303, 307, or 308. +The value can contain variables. +</para> + +<para> +There could be several <literal>add_trailer</literal> directives. +These directives are inherited from the previous level if and +only if there are no +<literal>add_trailer</literal> +directives defined on the current level. +</para> + +<para> +If the <literal>always</literal> parameter is specified +the specified field will be added regardless of the response code. +</para> + +</directive> + + <directive name="expires"> <syntax>[<literal>modified</literal>] <value>time</value></syntax> <syntax>
--- a/xml/ru/docs/http/ngx_http_headers_module.xml Tue Jun 27 15:13:39 2017 +0300 +++ b/xml/ru/docs/http/ngx_http_headers_module.xml Tue Jun 27 15:13:54 2017 +0300 @@ -10,7 +10,7 @@ <module name="Модуль ngx_http_headers_module" link="/ru/docs/http/ngx_http_headers_module.html" lang="ru" - rev="8"> + rev="9"> <section id="summary"> @@ -73,6 +73,37 @@ </directive> +<directive name="add_trailer"> +<syntax> +<value>имя</value> <value>значение</value> +[<literal>always</literal>]</syntax> +<default/> +<context>http</context> +<context>server</context> +<context>location</context> +<context>if в location</context> +<appeared-in>1.13.2</appeared-in> + +<para> +Добавляет указанное поле в конец ответа при условии, что код ответа +равен 200, 201, 206, 301, 302, 303, 307 или 308. +В значении можно использовать переменные. +</para> + +<para> +Директив <literal>add_trailer</literal> может быть несколько. +Директивы наследуются с предыдущего уровня при условии, что на данном +уровне не описаны свои директивы <literal>add_trailer</literal>. +</para> + +<para> +Если указан параметр <literal>always</literal>, +то указанное поле будет добавлено независимо от кода ответа. +</para> + +</directive> + + <directive name="expires"> <syntax>[<literal>modified</literal>] <value>время</value></syntax> <syntax>