Response transformer plugin configuration for KIC

Hi guys,

I need help in configuration of response transformer plugin for adding/appending dynamic headers to the response. I am able to add static headers to the response header, but even after adding the dynamic header, i get the static value. However, the same configuration works with request transformer plugin and the documentation of response transformer plugin does not cover it.

The configuration of both request and response transformer plugin is given below and i have enabled both of them on my ingress.

apiVersion: configuration.konghq.com/v1
config:
add:
headers:
- x-test-header:$(headers.Authorization)
kind: KongPlugin
metadata:
name: request-transformer
namespace: kong-test
plugin: request-transformer

apiVersion: configuration.konghq.com/v1
config:
append:
headers:
- x-test-response-header:$(headers.x-test-header)
kind: KongPlugin
metadata:
name: response-transformer
namespace: kong-test
plugin: response-transformer

I have also tried response header with the value x-test-response-header:$(headers.Authorization) but i still get the same static value $(headers.Authorization)
in response header.

The headers are available in the body which i have tested using httpbin service.

{
“headers”: {
“Accept”: “/”,
“Accept-Encoding”: “gzip, deflate, br”,
“Apikey”: “123456”,
“Authorization”: "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJlWkJzZTBYZURneTBwamxKaFczZVJtd29IdmxDN0lYaEFmMWFIRFVwWURnIn0…
}
}

Please let me know the right way to configure it.