changeset 2624:bd676d1da957

Clarified behavior of multiple proxy_cookie_ directives.
author Yaroslav Zhuravlev <yar@nginx.com>
date Wed, 25 Nov 2020 12:39:12 +0000
parents 2b71a9ef37c1
children 987768ee3211
files xml/en/docs/http/ngx_http_proxy_module.xml xml/ru/docs/http/ngx_http_proxy_module.xml
diffstat 2 files changed, 38 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/xml/en/docs/http/ngx_http_proxy_module.xml
+++ b/xml/en/docs/http/ngx_http_proxy_module.xml
@@ -10,7 +10,7 @@
 <module name="Module ngx_http_proxy_module"
         link="/en/docs/http/ngx_http_proxy_module.html"
         lang="en"
-        rev="70">
+        rev="71">
 
 <section id="summary">
 
@@ -867,6 +867,11 @@ can be specified on the same level:
 proxy_cookie_domain localhost example.org;
 proxy_cookie_domain ~\.([a-z]+\.[a-z]+)$ $1;
 </example>
+If several directives can be applied to the cookie,
+the first matching directive will be chosen.
+</para>
+
+<para>
 The <literal>off</literal> parameter cancels the effect
 of the <literal>proxy_cookie_domain</literal> directives
 inherited from the previous configuration level.
@@ -916,6 +921,8 @@ can be specified on the same configurati
 proxy_cookie_flags one httponly;
 proxy_cookie_flags ~ nosecure samesite=strict;
 </example>
+If several directives can be applied to the cookie,
+the first matching directive will be chosen.
 In the example, the <literal>httponly</literal> flag
 is added to the cookie <literal>one</literal>,
 for all other cookies
@@ -984,6 +991,11 @@ can be specified on the same level:
 proxy_cookie_path /one/ /;
 proxy_cookie_path / /two/;
 </example>
+If several directives can be applied to the cookie,
+the first matching directive will be chosen.
+</para>
+
+<para>
 The <literal>off</literal> parameter cancels the effect
 of the <literal>proxy_cookie_path</literal> directives
 inherited from the previous configuration level.
@@ -1709,6 +1721,12 @@ proxy_redirect default;
 proxy_redirect http://localhost:8000/  /;
 proxy_redirect http://www.example.com/ /;
 </example>
+If several directives can be applied to
+the header fields of a proxied server response,
+the first matching directive will be chosen.
+</para>
+
+<para>
 The <literal>off</literal> parameter cancels the effect
 of the <literal>proxy_redirect</literal> directives
 inherited from the previous configuration level.
--- a/xml/ru/docs/http/ngx_http_proxy_module.xml
+++ b/xml/ru/docs/http/ngx_http_proxy_module.xml
@@ -10,7 +10,7 @@
 <module name="Модуль ngx_http_proxy_module"
         link="/ru/docs/http/ngx_http_proxy_module.html"
         lang="ru"
-        rev="70">
+        rev="71">
 
 <section id="summary">
 
@@ -869,6 +869,11 @@ proxy_cookie_domain ~\.(?P&lt;sl_domain&
 proxy_cookie_domain localhost example.org;
 proxy_cookie_domain ~\.([a-z]+\.[a-z]+)$ $1;
 </example>
+Если к куке могут быть применены несколько директив,
+будет выбрана первая из них.
+</para>
+
+<para>
 Параметр <literal>off</literal> отменяет действие
 унаследованных с предыдущего уровня конфигурации
 директив <literal>proxy_cookie_domain</literal>.
@@ -919,6 +924,8 @@ proxy_cookie_domain ~\.([a-z]+\.[a-z]+)$
 proxy_cookie_flags one httponly;
 proxy_cookie_flags ~ nosecure samesite=strict;
 </example>
+Если к куке могут быть применены несколько директив,
+будет выбрана первая из них.
 В данном примере флаг <literal>httponly</literal>
 добавляется к куке <literal>one</literal>,
 для остальных кук
@@ -986,6 +993,11 @@ proxy_cookie_path ~*^/user/([^/]+) /u/$1
 proxy_cookie_path /one/ /;
 proxy_cookie_path / /two/;
 </example>
+Если к куке могут быть применены несколько директив,
+будет выбрана первая из них.
+</para>
+
+<para>
 Параметр <literal>off</literal> отменяет действие
 унаследованных с предыдущего уровня конфигурации
 директив <literal>proxy_cookie_path</literal>.
@@ -1713,6 +1725,12 @@ proxy_redirect default;
 proxy_redirect http://localhost:8000/  /;
 proxy_redirect http://www.example.com/ /;
 </example>
+Если к полям заголовка в ответе проксируемого сервера
+могут быть применены несколько директив,
+будет выбрана первая из них.
+</para>
+
+<para>
 Параметр <literal>off</literal> отменяет действие
 унаследованных с предыдущего уровня конфигурации
 директив <literal>proxy_redirect</literal>.