traefik_convertxff

package module
v0.0.0-...-e29da0d Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: MIT Imports: 4 Imported by: 0

README

Plugin for traefik: Convert X-Forwarded-For Header

Documentation

Index

Constants

View Source
const (
	XFF = "X-Forwarded-For"
)

Variables

This section is empty.

Functions

func New

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

New instantiates and returns the required components used to handle a HTTP request

Types

type Config

type Config struct{}

func CreateConfig

func CreateConfig() *Config

CreateConfig creates and initializes the plugin configuration.

type ConvertXFF

type ConvertXFF struct {
	// contains filtered or unexported fields
}

ConvertXFF holds the necessary components of a Traefik plugin

func (*ConvertXFF) ServeHTTP

func (u *ConvertXFF) ServeHTTP(rw http.ResponseWriter, req *http.Request)

ServeHTTP removes the brackets from IPv6 addresses and rewrites ipv6 mapped ipv4 to real ipv4

Jump to

Keyboard shortcuts

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