Closed basaran closed 3 months ago
Hi, @basaran, to add multiple headers yo can use fifo.Group + header.Append
https://www.krakend.io/docs/backends/martian/#fifo-group https://www.krakend.io/docs/backends/martian/#append-a-header
like this:
"backend": [
{
....
"extra_config": {
"backend/http": { "return_error_code": true },
"modifier/martian": {
"fifo.Group": {
"scope": [ "request" ],
"aggregateErrors": true,
"modifiers": [
{ "header.Append": { "scope": [ "request" ], "name": "X-NewHeader1", "value": "value1" } },
{ "header.Append": { "scope": [ "request" ], "name": "X-NewHeader2", "value": "value2" } }
]
}
}
}
}
]
Thank you very much for the snippet and the explanation. Much appreciated.
Environment info:
Version: 2.6.0 Linux 6.7.7-1-MANJARO x86_64
I understand we can add headers or modify existing ones by using header.Modifier. https://www.krakend.io/docs/backends/martian/#header-modifier
Is there a mechanism to add multiple headers using this interface, or do we need to use Lua or custom go plugins?