[TOC]

How to modify headers

Installing the demo program

If you haven’t installed the demo program yet, Please refer to Quick Start to install Aeraki, Istio, and the demo.

After installation, you can see that the following two NSs have been added to the cluster, and the Dubbo and Thrift demo applications are installed in these two NSs. You can choose either of them to test.

➜  ~ kubectl get ns|grep metameta-dubbo        Active   16mmeta-thrift       Active   16m

Modify the request header

Aeraki supports header mutation. For example, we can use the following MetaRouter to modify the request message header.

Note: Aeraki and MetaProtocol framework support header mutation. Whether a certain application protocol supports header mutation depends on the implementation of the codec of that protocol. To support header modification, the codec implementation needs to get out the key/value pairs in the mutation structure and wrriten them into the outgoing message during the encoding phase.

Create a MetaRouter rule and add two message headers foo/bar, foo1/bar1 in the requestMutation part:

``` kubectl apply -f- Last modified May 9, 2022: Update header-mutation.md (f7eb909)