From 93f312d95b9ded74ab55ce655de95e4a720d40eb Mon Sep 17 00:00:00 2001 From: "update-envoy[bot]" <135279899+update-envoy[bot]@users.noreply.github.com> Date: Fri, 1 Sep 2023 06:46:32 +0000 Subject: [PATCH] http: added OVERWRITE_IF_EXISTS header manipulator (#27923) This is to address a use case when a header should be modified only when it exists and should not be added when it does not exist. Risk Level: Low Testing: Unit tests. Docs Changes: Yes. Release Notes: Yes Platform Specific Features: No Fixes #27907 Signed-off-by: Christoph Pakulski Mirrored from https://github.com/envoyproxy/envoy @ d9ba9d17016296c50069584905dee1a19427d42e --- envoy/config/core/v3/base.proto | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/envoy/config/core/v3/base.proto b/envoy/config/core/v3/base.proto index 859fcbae..f84e168b 100644 --- a/envoy/config/core/v3/base.proto +++ b/envoy/config/core/v3/base.proto @@ -359,6 +359,10 @@ message HeaderValueOption { // the header already exists. If the header doesn't exist then this will add the header // with specified key and value. OVERWRITE_IF_EXISTS_OR_ADD = 2; + + // This action will overwrite the specified value by discarding any existing values if + // the header already exists. If the header doesn't exist then this will be no-op. + OVERWRITE_IF_EXISTS = 3; } // Header name/value pair that this option applies to.