From 1be7140adefb855bc65722632e9d1d4fa7a90373 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Mon, 18 Nov 2024 18:03:23 +0100 Subject: [PATCH] MINOR: http-ana: Add support for "set-cookie-fmt" option to redirect rules It is now possible to use a log-format string to define the "Set-Cookie" header value of a response generated by a redirect rule. There is no special check on the result format and it is not possible during the configuration parsing. It is proably not a big deal because already existing "set-cookie" and "clear-cookie" options don't perform any check. Here is an example: http-request redirect location https://someurl.com/ set-cookie haproxy="%[var(txn.var)]" This patch should fix the issue #1784. --- doc/configuration.txt | 6 ++++ include/haproxy/http_ana-t.h | 1 + include/haproxy/proxy-t.h | 6 ++-- src/http_ana.c | 9 ++++-- src/http_rules.c | 60 +++++++++++++++++++++++++++--------- 5 files changed, 63 insertions(+), 19 deletions(-) diff --git a/doc/configuration.txt b/doc/configuration.txt index 9bd5d45ae..afe5edb38 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -11453,6 +11453,12 @@ redirect scheme [code ]