proxy

package
v0.10.1-0...-c8b812c Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2022 License: EPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsCorsPreflight

func IsCorsPreflight() goproxy.ReqConditionFunc

Returns a ReqCondition testing whether the request is the CORS preflight

func UrlMatches

func UrlMatches(regexps ...*regexp.Regexp) goproxy.ReqConditionFunc

UrlMatches returns a ReqCondition testing whether the destination URL of the request matches any of the given regexp

Types

type Handler

type Handler func(r *http.Request, ctx *goproxy.ProxyCtx) (*http.Request, *http.Response)

type Proxy

type Proxy struct {
	*goproxy.ProxyHttpServer
	// contains filtered or unexported fields
}

func NewProxy

func NewProxy(proxyHandler Handler, caKeyPath, caCertPath string, insecureSkipVerify bool, trustedCertificatePaths []string) (*Proxy, error)

func NewReverseProxy

func NewReverseProxy(verifyingHandler Handler, proxyHandler Handler, authHandler Handler, authServicePath string, excludes ...*regexp.Regexp) (*Proxy, error)

func (*Proxy) Serve

func (proxy *Proxy) Serve(listenAddr, crtFile, keyFile string, shutdownTimeout time.Duration) error

func (*Proxy) Stop

func (proxy *Proxy) Stop() <-chan struct{}

Jump to

Keyboard shortcuts

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