comparison xml/en/docs/http/ngx_http_proxy_module.xml @ 2599:5c5a36560f97

Added the proxy_cookie_flags directive.
author Yaroslav Zhuravlev <yar@nginx.com>
date Tue, 29 Sep 2020 15:52:05 +0100
parents 361a28cca097
children 6684517c9d19
comparison
equal deleted inserted replaced
2598:361a28cca097 2599:5c5a36560f97
8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> 8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">
9 9
10 <module name="Module ngx_http_proxy_module" 10 <module name="Module ngx_http_proxy_module"
11 link="/en/docs/http/ngx_http_proxy_module.html" 11 link="/en/docs/http/ngx_http_proxy_module.html"
12 lang="en" 12 lang="en"
13 rev="68"> 13 rev="69">
14 14
15 <section id="summary"> 15 <section id="summary">
16 16
17 <para> 17 <para>
18 The <literal>ngx_http_proxy_module</literal> module allows passing 18 The <literal>ngx_http_proxy_module</literal> module allows passing
873 </para> 873 </para>
874 874
875 </directive> 875 </directive>
876 876
877 877
878 <directive name="proxy_cookie_flags">
879 <syntax>
880 <literal>off</literal> |
881 <value>cookie</value>
882 [<value>flag</value> ...]</syntax>
883 <default>off</default>
884 <context>http</context>
885 <context>server</context>
886 <context>location</context>
887 <appeared-in>1.19.3</appeared-in>
888
889 <para>
890 Sets one or more flags for the cookie.
891 The <value>cookie</value> can contain text, variables, and their combinations.
892 The
893 <literal>secure</literal>,
894 <literal>httponly</literal>,
895 <literal>samesite=strict</literal>,
896 <literal>samesite=lax</literal>,
897 <literal>samesite=none</literal>
898 parameters add the corresponding flags.
899 The
900 <literal>nosecure</literal>,
901 <literal>nohttponly</literal>,
902 <literal>nosamesite</literal>
903 parameters remove the corresponding flags.
904 </para>
905
906 <para>
907 The cookie can also be specified using regular expressions.
908 In this case, <value>cookie</value> should start from
909 the “<literal>~</literal>” symbol.
910 </para>
911
912 <para>
913 Several <literal>proxy_cookie_flags</literal> directives
914 can be specified on the same configuration level:
915 <example>
916 proxy_cookie_flags one httponly;
917 proxy_cookie_flags ~ nosecure samesite=strict;
918 </example>
919 In the example, the <literal>httponly</literal> flag
920 is added to the cookie <literal>one</literal>,
921 for all other cookies
922 the <literal>samesite=strict</literal> flag is added and
923 the <literal>secure</literal> flag is deleted.
924 </para>
925
926 <para>
927 The <literal>off</literal> parameter cancels the effect
928 of the <literal>proxy_cookie_flags</literal> directives
929 inherited from the previous configuration level.
930 </para>
931
932 </directive>
933
934
878 <directive name="proxy_cookie_path"> 935 <directive name="proxy_cookie_path">
879 <syntax><literal>off</literal></syntax> 936 <syntax><literal>off</literal></syntax>
880 <syntax><value>path</value> <value>replacement</value></syntax> 937 <syntax><value>path</value> <value>replacement</value></syntax>
881 <default>off</default> 938 <default>off</default>
882 <context>http</context> 939 <context>http</context>