Skip to content

Commit

Permalink
proto: add a new field called append_action in the HeaderValueOption (e…
Browse files Browse the repository at this point in the history
…nvoyproxy#18246)

Signed-off-by: Rohit Agrawal <rohit.agrawal@databricks.com>
  • Loading branch information
agrawroh authored and soulxu committed Oct 15, 2021
1 parent 705a58d commit 6100e36
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions api/envoy/config/core/v3/base.proto
Expand Up @@ -320,12 +320,33 @@ message HeaderValueOption {
option (udpa.annotations.versioning).previous_message_type =
"envoy.api.v2.core.HeaderValueOption";

// Describes the supported actions types for header append action.
enum HeaderAppendAction {
// This action will append the specified value to the existing values if the header
// already exists. If the header doesn't exist then this will add the header with
// specified key and value.
APPEND_IF_EXISTS_OR_ADD = 0;

// This action will add the header if it doesn't already exist. If the header
// already exists then this will be a no-op.
ADD_IF_ABSENT = 1;

// 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 add the header
// with specified key and value.
OVERWRITE_IF_EXISTS_OR_ADD = 2;
}

// Header name/value pair that this option applies to.
HeaderValue header = 1 [(validate.rules).message = {required: true}];

// Should the value be appended? If true (default), the value is appended to
// existing values. Otherwise it replaces any existing values.
google.protobuf.BoolValue append = 2;

// [#not-implemented-hide:] Describes the action taken to append/overwrite the given value for an existing header
// or to only add this header if it's absent. Value defaults to :ref:`APPEND_IF_EXISTS_OR_ADD<envoy_v3_api_enum_value_config.core.v3.HeaderValueOption.HeaderAppendAction.APPEND_IF_EXISTS_OR_ADD>`.
HeaderAppendAction append_action = 3 [(validate.rules).enum = {defined_only: true}];
}

// Wrapper for a set of headers.
Expand Down

0 comments on commit 6100e36

Please sign in to comment.