http: added a new dual header mutation filter that could be used as downstream/upstream filter (#25658)

Check #24100 for more detailed context.

Risk Level: low. new L7 extension.
Testing: unit.
Docs Changes: added.
Release Notes: added.

Signed-off-by: wbpcode <wangbaiping@corp.netease.com>

Mirrored from https://github.com/envoyproxy/envoy @ d448b848c0db5498ad0abec687eebdc3b0b6b900
pull/626/head
data-plane-api(Azure Pipelines) 2 years ago
parent a826b27449
commit 670949fe24
  1. 1
      BUILD
  2. 12
      envoy/extensions/filters/http/header_mutation/v3/BUILD
  3. 36
      envoy/extensions/filters/http/header_mutation/v3/header_mutation.proto
  4. 1
      versioning/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",

@ -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",
],
)

@ -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;
}

@ -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",

Loading…
Cancel
Save