consul/proto-public/pbmesh/v1alpha1/pbproxystate/header_mutations.proto

48 lines
1.1 KiB
Protocol Buffer
Raw Normal View History

// Copyright (c) HashiCorp, Inc.
[COMPLIANCE] License changes (#18443) * Adding explicit MPL license for sub-package This directory and its subdirectories (packages) contain files licensed with the MPLv2 `LICENSE` file in this directory and are intentionally licensed separately from the BSL `LICENSE` file at the root of this repository. * Adding explicit MPL license for sub-package This directory and its subdirectories (packages) contain files licensed with the MPLv2 `LICENSE` file in this directory and are intentionally licensed separately from the BSL `LICENSE` file at the root of this repository. * Updating the license from MPL to Business Source License Going forward, this project will be licensed under the Business Source License v1.1. Please see our blog post for more details at <Blog URL>, FAQ at www.hashicorp.com/licensing-faq, and details of the license at www.hashicorp.com/bsl. * add missing license headers * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 --------- Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
2023-08-11 13:12:13 +00:00
// SPDX-License-Identifier: BUSL-1.1
syntax = "proto3";
package hashicorp.consul.mesh.v1alpha1.pbproxystate;
// Note: it's nice to have this list of header mutations as opposed to configuration similar to Envoy because it
// translates more nicely from GAMMA HTTPRoute, and our existing service router config. Then xds code can handle turning
// it into envoy xds.
message HeaderMutation {
oneof action {
RequestHeaderAdd request_header_add = 1;
RequestHeaderRemove request_header_remove = 2;
ResponseHeaderAdd response_header_add = 3;
ResponseHeaderRemove response_header_remove = 4;
}
}
message RequestHeaderAdd {
Header header = 1;
AppendAction append_action = 2;
}
message RequestHeaderRemove {
repeated string header_keys = 1;
}
message ResponseHeaderAdd {
Header header = 1;
AppendAction append_action = 2;
}
message ResponseHeaderRemove {
repeated string header_keys = 1;
}
message Header {
string key = 1;
string value = 2;
}
enum AppendAction {
// buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX
APPEND_ACTION_APPEND_IF_EXISTS_OR_ADD = 0;
APPEND_ACTION_OVERWRITE_IF_EXISTS_OR_ADD = 1;
}