Search code examples
api-gatewaykongkong-plugin

kong gateway add headers


I want to add some headers to my incoming rest api requests with kong gateway. In the kong admin UI, I set these parametes :

config.add.headers: myheader: $(consumer_id)

myheader is a name for new header and I want to set variable of consumer_id value in these header. but after this configuration , kong gives me a empty value. I also tried ${consumer_id} and etc ... but none of these variables worked.!

So the question is: what's the VARIABLE syntaxs of consumer_id or custom_id and ... too call in kong gateway.

thx BR


Solution

  • finally I found the correct header from network dump, and replace it with My required header.

    the right header for my case was : X-Consumer-Custom-ID