Add a new header

Configure the plugin to add a new header to the request before proxying it to the upstream server.

Set up the plugin

Make the following request:

curl -i -X POST http://localhost:8001/plugins/ \
    --header "Accept: application/json" \
    --header "Content-Type: application/json" \
    --data '
    {
      "name": "request-transformer",
      "config": {
        "add": {
          "headers": [
            "New-Header:Header Value"
          ]
        }
      }
    }
    '
Copied to clipboard!

Did this doc help?

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!