traefik_plugin_add_response_header

package module
v0.2.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 7, 2023 License: MIT Imports: 6 Imported by: 0

README

traefik-plugin-add-response-header

Traefik proxy plugin to copy request header to response. I use this plugin to copy assigned trace ID to response headers.

Configuration

Add plugin:

experimental:
  plugins:
    add-response-header:
      moduleName: github.com/r3nic1e/traefik-plugin-add-response-header
      version: v0.2.0

Configure middleware:

apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
  name: add-response-header
spec:
  plugin:
    add-response-header:
      from: "X-B3-TraceId"
      to: "X-B3-TraceId"

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(_ context.Context, next http.Handler, config *Config, name string) (http.Handler, error)

Types

type Config

type Config struct {
	From string `json:"from,omitempty"`
	To   string `json:"to,omitempty"`
}

func CreateConfig

func CreateConfig() *Config

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL