Clear request headers

Use the Datakit plugin to dynamically clear headers from inputs to service_request and response nodes. To clear a header, set its value to null or ~.

This example contains the following nodes:

  1. The node HEADERS adds a header and clears another header.
  2. The node API sends the updated request headers to an external API. The node input contains { "X-Add-Me": "added" } only, since X-Ignored was cleared.
  3. The node EXIT sends a response to the client with the API headers and body. As with the API node, the input only contains { "X-Add-Me": "added" }.

Set up the plugin

Something wrong?

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!