Traefik custom headers plugin is a middleware plugin for Traefik which renames headers in the response, while keeping their values.
pilot:
token: "xxxx"
experimental:
plugins:
renameHeaders:
modulename: "gitlab.com/traefik-custom-headers-plugin/traefik-custom-headers-plugin"
version: "v0.0.1"
To configure the Rename Headers plugin you should create a middleware in your dynamic configuration as explained here. The following example creates and uses the renameHeaders middleware plugin to rename the "custom_id" header
http:
routes:
my-router:
rule: "Host(`localhost`)"
service: "my-service"
middlewares :
- "renameHeaders"
services:
my-service:
loadBalancer:
servers:
- url: "http://127.0.0.1"
middlewares:
renameHeaders:
plugin:
renameData:
- existingHeaderName: "Customheader"
newHeaderName: "customheader"