routeservice

package
v0.0.0-...-9b2d5d1 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2016 License: Apache-2.0, BSD-2-Clause-Views, BSD-3-Clause, + 1 more Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RouteServiceSignature    = "X-CF-Proxy-Signature"
	RouteServiceForwardedURL = "X-CF-Forwarded-Url"
	RouteServiceMetadata     = "X-CF-Proxy-Metadata"
)

Variables

View Source
var RouteServiceExpired = errors.New("Route service request expired")
View Source
var RouteServiceForwardedURLMismatch = errors.New("Route service forwarded url mismatch")

Functions

This section is empty.

Types

type RouteServiceConfig

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

func NewRouteServiceConfig

func NewRouteServiceConfig(
	logger lager.Logger,
	enabled bool,
	timeout time.Duration,
	crypto secure.Crypto,
	cryptoPrev secure.Crypto,
	recommendHttps bool,
) *RouteServiceConfig

func (*RouteServiceConfig) Request

func (rs *RouteServiceConfig) Request(rsUrl, forwardedUrl string) (RouteServiceRequest, error)

func (*RouteServiceConfig) RouteServiceEnabled

func (rs *RouteServiceConfig) RouteServiceEnabled() bool

func (*RouteServiceConfig) SetupRouteServiceRequest

func (rs *RouteServiceConfig) SetupRouteServiceRequest(request *http.Request, args RouteServiceRequest)

func (*RouteServiceConfig) ValidateSignature

func (rs *RouteServiceConfig) ValidateSignature(headers *http.Header, requestUrl string) error

type RouteServiceRequest

type RouteServiceRequest struct {
	URLString      string
	ParsedUrl      *url.URL
	Signature      string
	Metadata       string
	ForwardedURL   string
	RecommendHttps bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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