traefik_middleware_redirect

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 4, 2021 License: MIT Imports: 4 Imported by: 0

README

Traefik Middleware for Redirect

Middleware for Redirects with custom response code & cache control header.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

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

Types

type Config

type Config struct {
	RedirectCode int    `json:"redirectCode,omitempty"`
	RedirectURI  string `json:"redirectUri,omitempty"`
	ExpiringTime int    `json:"expiringTime,omitempty"`
}

Config the plugin configuration.

func CreateConfig

func CreateConfig() *Config

type Redirect

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

func (*Redirect) ServeHTTP

func (middleware *Redirect) ServeHTTP(rw http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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