Traefik proxy plugin to copy request header to response. I use this plugin to copy assigned trace ID to response headers.
This plugin copies full response body to temporary buffer. Serious performance issues may occur
Add plugin:
experimental:plugins:add-response-header:moduleName: github.com/r3nic1e/traefik-plugin-add-response-headerversion: v0.4.0
Configure middleware:
apiVersion: traefik.containo.us/v1alpha1kind: Middlewaremetadata:name: add-response-headerspec:plugin:add-response-header:from: "X-B3-TraceId"to: "X-B3-TraceId"
You can also use regexp:
apiVersion: traefik.containo.us/v1alpha1kind: Middlewaremetadata:name: add-response-headerspec:plugin:add-response-header:from: "X-B3-TraceId"to: "X-B3-TraceId"overwrite: trueregexp: "^(.*)/(.*)$"replacement: "$1:$2"