rewrite

package
v0.0.0-...-86e3eba Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2016 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrMissingSSLRedirect returned error when the ingress does not contains the
	// ssl-redirect annotation
	ErrMissingSSLRedirect = errors.New("ssl-redirect annotations is missing")

	// ErrInvalidBool gets returned when the str value is not convertible to a bool
	ErrInvalidBool = errors.New("ssl-redirect annotations has invalid value")
)

Functions

This section is empty.

Types

type Redirect

type Redirect struct {
	// Target URI where the traffic must be redirected
	Target string
	// AddBaseURL indicates if is required to add a base tag in the head
	// of the responses from the upstream servers
	AddBaseURL bool
	// Should indicates if the location section should be accessible SSL only
	SSLRedirect bool
}

Redirect describes the per location redirect config

func ParseAnnotations

func ParseAnnotations(cfg config.Configuration, ing *extensions.Ingress) (*Redirect, error)

ParseAnnotations parses the annotations contained in the ingress rule used to rewrite the defined paths

Jump to

Keyboard shortcuts

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