[DOC] fix description of cookie "insert" and "indirect" modes

The doc was wrong as the insert mode by default does not insert in
direct requests, and by default transmits the cookies to the server.
This was right in the old doc and it has not changed since the
beginning.
This commit is contained in:
Willy Tarreau 2010-08-31 22:54:15 +02:00
parent a168b10a71
commit a79094d3e4

View File

@ -1690,12 +1690,15 @@ cookie <name> [ rewrite | insert | prefix ] [ indirect ] [ nocache ]
"insert" and "prefix". "insert" and "prefix".
insert This keyword indicates that the persistence cookie will have to insert This keyword indicates that the persistence cookie will have to
be inserted by haproxy in the responses. If the server emits a be inserted by haproxy in server responses if the client did not
cookie with the same name, it will be replaced anyway. For this already have a cookie that would have permitted it to access this
reason, this mode can be used to upgrade existing configurations server. If the server emits a cookie with the same name, it will
running in the "rewrite" mode. The cookie will only be a session be remove before processing. For this reason, this mode can be
cookie and will not be stored on the client's disk. Due to used to upgrade existing configurations running in the "rewrite"
caching effects, it is generally wise to add the "indirect" and mode. The cookie will only be a session cookie and will not be
stored on the client's disk. By default, unless the "indirect"
option is added, the server will see the cookies emitted by the
client. Due to caching effects, it is generally wise to add the
"nocache" or "postonly" keywords (see below). The "insert" "nocache" or "postonly" keywords (see below). The "insert"
keyword is not compatible with "rewrite" and "prefix". keyword is not compatible with "rewrite" and "prefix".
@ -1711,16 +1714,13 @@ cookie <name> [ rewrite | insert | prefix ] [ indirect ] [ nocache ]
this mode requires the HTTP close mode. The "prefix" keyword is this mode requires the HTTP close mode. The "prefix" keyword is
not compatible with "rewrite" and "insert". not compatible with "rewrite" and "insert".
indirect When this option is specified in insert mode, cookies will only indirect When this option is specified, no cookie will be emitted to a
be added when the server was not reached after a direct access, client which already has a valid one for the server which has
which means that only when a server is elected after applying a processed the request. If the server sets such a cookie itself,
load-balancing algorithm, or after a redispatch, then the cookie it will be removed. In "insert" mode, this will additionally
will be inserted. If the client has all the required information remove cookies from requests transmitted to the server, making
to connect to the same server next time, no further cookie will the persistence mechanism totally transparent from an application
be inserted. In all cases, when the "indirect" option is used in point of view.
insert mode, the cookie is always removed from the requests
transmitted to the server. The persistence mechanism then becomes
totally transparent from the application point of view.
nocache This option is recommended in conjunction with the insert mode nocache This option is recommended in conjunction with the insert mode
when there is a cache between the client and HAProxy, as it when there is a cache between the client and HAProxy, as it