i want to rename my api key header from api-key to apikey with this request
curl -X POST http://localhost:8001/plugins \
--data "name=request-transformer" \
--data-urlencode "config.rename.headers=apikey:\$(headers['api-key'] or 'api-key')" \
--data "config.remove.headers=api-key"
but i am getting error
{"message":"schema violation (config.rename: {\n headers = {\n \"'$(headers['api-key'] or 'api-key')' is not a valid header\"\n }\n})","name":"schema violation","fields":{"config":{"rename":{"headers":["'$(headers['api-key'] or 'api-key')' is not a valid header"]}}},"code":2}
any suggestion to solve this issue thank you
The syntax of
config.rename.headers=
isheader-old-name:header-new-name
So in your case: