diff --git a/BUILD b/BUILD index c1bde726..8786b5d7 100644 --- a/BUILD +++ b/BUILD @@ -180,6 +180,7 @@ proto_library( "//envoy/extensions/filters/http/grpc_stats/v3:pkg", "//envoy/extensions/filters/http/grpc_web/v3:pkg", "//envoy/extensions/filters/http/gzip/v3:pkg", + "//envoy/extensions/filters/http/header_mutation/v3:pkg", "//envoy/extensions/filters/http/header_to_metadata/v3:pkg", "//envoy/extensions/filters/http/health_check/v3:pkg", "//envoy/extensions/filters/http/ip_tagging/v3:pkg", diff --git a/envoy/extensions/filters/http/header_mutation/v3/BUILD b/envoy/extensions/filters/http/header_mutation/v3/BUILD new file mode 100644 index 00000000..7af7ae04 --- /dev/null +++ b/envoy/extensions/filters/http/header_mutation/v3/BUILD @@ -0,0 +1,12 @@ +# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") + +licenses(["notice"]) # Apache 2 + +api_proto_package( + deps = [ + "//envoy/config/common/mutation_rules/v3:pkg", + "@com_github_cncf_udpa//udpa/annotations:pkg", + ], +) diff --git a/envoy/extensions/filters/http/header_mutation/v3/header_mutation.proto b/envoy/extensions/filters/http/header_mutation/v3/header_mutation.proto new file mode 100644 index 00000000..d7b5cbc5 --- /dev/null +++ b/envoy/extensions/filters/http/header_mutation/v3/header_mutation.proto @@ -0,0 +1,36 @@ +syntax = "proto3"; + +package envoy.extensions.filters.http.header_mutation.v3; + +import "envoy/config/common/mutation_rules/v3/mutation_rules.proto"; + +import "udpa/annotations/status.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.filters.http.header_mutation.v3"; +option java_outer_classname = "HeaderMutationProto"; +option java_multiple_files = true; +option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/header_mutation/v3;header_mutationv3"; +option (udpa.annotations.file_status).package_version_status = ACTIVE; + +// [#protodoc-title: Header mutation filter configuration] +// [#extension: envoy.filters.http.header_mutation] + +message Mutations { + // The request mutations are applied before the request is forwarded to the upstream cluster. + repeated config.common.mutation_rules.v3.HeaderMutation request_mutations = 1; + + // The response mutations are applied before the response is sent to the downstream client. + repeated config.common.mutation_rules.v3.HeaderMutation response_mutations = 2; +} + +// Per route configuration for the header mutation filter. If this is configured at multiple levels +// (route level, virtual host level, and route table level), only the most specific one will be used. +message HeaderMutationPerRoute { + Mutations mutations = 1; +} + +// Configuration for the header mutation filter. The mutation rules in the filter configuration will +// always be applied first and then the per-route mutation rules, if both are specified. +message HeaderMutation { + Mutations mutations = 1; +} diff --git a/versioning/BUILD b/versioning/BUILD index 7412d028..309506ce 100644 --- a/versioning/BUILD +++ b/versioning/BUILD @@ -118,6 +118,7 @@ proto_library( "//envoy/extensions/filters/http/grpc_stats/v3:pkg", "//envoy/extensions/filters/http/grpc_web/v3:pkg", "//envoy/extensions/filters/http/gzip/v3:pkg", + "//envoy/extensions/filters/http/header_mutation/v3:pkg", "//envoy/extensions/filters/http/header_to_metadata/v3:pkg", "//envoy/extensions/filters/http/health_check/v3:pkg", "//envoy/extensions/filters/http/ip_tagging/v3:pkg",