header_mutation: Apply header mutations specified in all route levels (#30220)

* header mutation with all route level

Signed-off-by: tyxia <tyxia@google.com>

* remove dead code

Signed-off-by: tyxia <tyxia@google.com>

* remove dead code

Signed-off-by: tyxia <tyxia@google.com>

* utility function

Signed-off-by: tyxia <tyxia@google.com>

* fix format

Signed-off-by: tyxia <tyxia@google.com>

* fix format

Signed-off-by: tyxia <tyxia@google.com>

* fix typo

Signed-off-by: tyxia <tyxia@google.com>

* update header mutation test to match new impl

Signed-off-by: tyxia <tyxia@google.com>

* update test

Signed-off-by: tyxia <tyxia@google.com>

* tweak

Signed-off-by: tyxia <tyxia@google.com>

* fix format

Signed-off-by: tyxia <tyxia@google.com>

* fix

Signed-off-by: tyxia <tyxia@google.com>

* merge fix

Signed-off-by: tyxia <tyxia@google.com>

* fix format

Signed-off-by: tyxia <tyxia@google.com>

* add config option for specific

Signed-off-by: tyxia <tyxia@google.com>

* add release note

Signed-off-by: tyxia <tyxia@google.com>

* reword the comment

Signed-off-by: tyxia <tyxia@google.com>

* fix typo

Signed-off-by: tyxia <tyxia@google.com>

* fix format

Signed-off-by: tyxia <tyxia@google.com>

* test coverage

Signed-off-by: tyxia <tyxia@google.com>

* nit

Signed-off-by: tyxia <tyxia@google.com>

* reword

Signed-off-by: tyxia <tyxia@google.com>

* fix

Signed-off-by: tyxia <tyxia@google.com>

* coverage

Signed-off-by: tyxia <tyxia@google.com>

* comment

Signed-off-by: tyxia <tyxia@google.com>

* fix typo

Signed-off-by: tyxia <tyxia@google.com>

* remove

Signed-off-by: tyxia <tyxia@google.com>

* retrigger CI

Signed-off-by: tyxia <tyxia@google.com>

* set most_specific_wins false

Signed-off-by: tyxia <tyxia@google.com>

* tweak comments

Signed-off-by: tyxia <tyxia@google.com>

* update

Signed-off-by: tyxia <tyxia@google.com>

* fix format

Signed-off-by: tyxia <tyxia@google.com>

* update per review

Signed-off-by: tyxia <tyxia@google.com>

---------

Signed-off-by: tyxia <tyxia@google.com>

Mirrored from https://github.com/envoyproxy/envoy @ 5b7bbef9d0d5f2c569034b71e6030c29652e3ac5
main
update-envoy[bot] 1 year ago
parent 3b5215c3c2
commit 78221529ed
  1. 11
      envoy/extensions/filters/http/header_mutation/v3/header_mutation.proto

@ -23,8 +23,7 @@ message Mutations {
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.
// Per route configuration for the header mutation filter.
message HeaderMutationPerRoute {
Mutations mutations = 1;
}
@ -33,4 +32,12 @@ message HeaderMutationPerRoute {
// always be applied first and then the per-route mutation rules, if both are specified.
message HeaderMutation {
Mutations mutations = 1;
// If per route HeaderMutationPerRoute config is configured at multiple route levels, header mutations
// at all specified levels are evaluated. By default, the order is from most specific (i.e. route entry level)
// to least specific (i.e. route configuration level). Later header mutations may override earlier mutations.
//
// This order can be reversed by setting this field to true. In other words, most specific level mutation
// is evaluated last.
bool most_specific_header_mutations_wins = 2;
}

Loading…
Cancel
Save