From 3c7c3396a7eb88b6914aaa5fabf3036ea4e348ba Mon Sep 17 00:00:00 2001 From: nisbet-hubbard <87453615+nisbet-hubbard@users.noreply.github.com> Date: Tue, 1 Oct 2024 20:20:35 +0800 Subject: [PATCH 1/2] Update expr.xml --- docs/manual/expr.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/manual/expr.xml b/docs/manual/expr.xml index 450ee0eb394..732fe64c5f8 100644 --- a/docs/manual/expr.xml +++ b/docs/manual/expr.xml @@ -761,7 +761,8 @@ Require expr replace(%{REQUEST_METHOD}, 'E', 'O') == 'GET'" Header set foo-checksum "expr=%{md5:foo}" # This delays the evaluation of the condition clause compared to <If> -Header always set CustomHeader my-value "expr=%{REQUEST_URI} =~ m#^/special_path\.php$#" +SetEnvIf REQUEST_URI ^/special_path\.php$ special +Header set CustomHeader my-value env=special # Add a header to forward client's certificate SAN to some backend RequestHeader set X-Client-SAN "expr=%{:join PeerExtList('subjectAltName'):}" From 0856423aa8fa395a88c64c736d03d495f1ef0a59 Mon Sep 17 00:00:00 2001 From: nisbet-hubbard <87453615+nisbet-hubbard@users.noreply.github.com> Date: Tue, 1 Oct 2024 20:34:22 +0800 Subject: [PATCH 2/2] Use same condition argument --- docs/manual/expr.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/manual/expr.xml b/docs/manual/expr.xml index 732fe64c5f8..22ff8a15994 100644 --- a/docs/manual/expr.xml +++ b/docs/manual/expr.xml @@ -762,7 +762,7 @@ Header set foo-checksum "expr=%{md5:foo}" # This delays the evaluation of the condition clause compared to <If> SetEnvIf REQUEST_URI ^/special_path\.php$ special -Header set CustomHeader my-value env=special +Header always set CustomHeader my-value env=special # Add a header to forward client's certificate SAN to some backend RequestHeader set X-Client-SAN "expr=%{:join PeerExtList('subjectAltName'):}"