# HG changeset patch # User Yaroslav Zhuravlev # Date 1601391125 -3600 # Node ID 5c5a36560f97dc261ea50ccc80a5ec7f1c2fd558 # Parent 361a28cca097a4c01182bd454ea9d0b9de4c2379 Added the proxy_cookie_flags directive. diff --git a/xml/en/docs/http/ngx_http_proxy_module.xml b/xml/en/docs/http/ngx_http_proxy_module.xml --- a/xml/en/docs/http/ngx_http_proxy_module.xml +++ b/xml/en/docs/http/ngx_http_proxy_module.xml @@ -10,7 +10,7 @@ + rev="69">
@@ -875,6 +875,63 @@ inherited from the previous configuratio + + + off | + cookie + [flag ...] +off +http +server +location +1.19.3 + + +Sets one or more flags for the cookie. +The cookie can contain text, variables, and their combinations. +The +secure, +httponly, +samesite=strict, +samesite=lax, +samesite=none +parameters add the corresponding flags. +The +nosecure, +nohttponly, +nosamesite +parameters remove the corresponding flags. + + + +The cookie can also be specified using regular expressions. +In this case, cookie should start from +the “~” symbol. + + + +Several proxy_cookie_flags directives +can be specified on the same configuration level: + +proxy_cookie_flags one httponly; +proxy_cookie_flags ~ nosecure samesite=strict; + +In the example, the httponly flag +is added to the cookie one, +for all other cookies +the samesite=strict flag is added and +the secure flag is deleted. + + + +The off parameter cancels the effect +of the proxy_cookie_flags directives +inherited from the previous configuration level. + + + + + off path replacement diff --git a/xml/ru/docs/http/ngx_http_proxy_module.xml b/xml/ru/docs/http/ngx_http_proxy_module.xml --- a/xml/ru/docs/http/ngx_http_proxy_module.xml +++ b/xml/ru/docs/http/ngx_http_proxy_module.xml @@ -10,7 +10,7 @@ + rev="69">
@@ -877,6 +877,64 @@ proxy_cookie_domain ~\.([a-z]+\.[a-z]+)$ + + + off | + кука + [флаг ...] +off +http +server +location +1.19.3 + + +Задаёт один или несколько флагов для куки. +В качестве куки +можно использовать текст, переменные и их комбинации. +Параметры +secure, +httponly, +samesite=strict, +samesite=lax, +samesite=none +добавляют соответствующие флаги. +Параметры +nosecure, +nohttponly, +nosamesite +удаляют соответствующие флаги. + + + +Куки также можно задать при помощи регулярных выражений. +При этом кука должна начинаться с символа +“~”. + + + +На одном уровне конфигурации может быть указано +несколько директив proxy_cookie_flags: + +proxy_cookie_flags one httponly; +proxy_cookie_flags ~ nosecure samesite=strict; + +В данном примере флаг httponly +добавляется к куке one, +для остальных кук +добавляется флаг samesite=strict и +удаляется флаг secure. + + + +Параметр off отменяет действие всех директив +proxy_cookie_flags +на данном уровне. + + + + + off путь замена