Plugin http-log config.header parameter

Hi, need help with configuring config.headers http-log plugin. I’m trying to add Authorization header (for auth with apikey to elasticsearch endpoint), but always got an error:

{"message":"schema violation (config.headers: expected a map)","name":"schema violation","fields":{"config":{"headers":"expected a map"}},"code":2}

What exactly kind of map needed? Did try several kinds of map, but no luck.

1 Like

I know that it is an old question, but I will answer to keep the thing documented. I had the same issue and I didn’t find an example in the official plugin documentation. I solved it by passing the header name as a map key:

curl -X PATCH http://localhost:8001/plugins/<uuid> --data "config.headers.Authorization=Bearer <token>"

© 2019 Kong Inc.    Terms  •  Privacy  •  FAQ