Search code examples
kongkong-plugin

How to remove Server header with kong response-transformer plugin?


I'm trying to remove the Server header by using the following declarative map in a serverless approach:

plugins:
  - name: response-transformer
    service: my-service
    config:
      remove.headers: Server

but I get:

in 'plugins':
 - in entry 1 of 'plugins':
in 'config':
  in 'remove.headers': unknown field

I also tried to override the value but it just seems that the above configuration has something missing...what am I doing wrong?


Solution

  • The format is like this

    - name: response-transformer
        service: my-service
        config:
          remove:
            headers: ["Server","Via"]