proxy

package
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2020 License: GPL-3.0, MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const BufferSize = 8192

Variables

This section is empty.

Functions

func NewBufferPool

func NewBufferPool() httputil.BufferPool

func NewSingleHostReverseProxy

func NewSingleHostReverseProxy(target *url.URL, opts ...proxyOption) *httputil.ReverseProxy

func WithBasicAuth

func WithBasicAuth(user, pass string) proxyOption

WithBasicAuth sets the basic auth header for the given user and password.

func WithErrorHandler

func WithErrorHandler(handler func(http.ResponseWriter, *http.Request, error)) proxyOption

WithErrorHandler sets the ErrorHandler callback function in Go's ReverseProxy.

func WithInsecureCertificates

func WithInsecureCertificates(enable bool) proxyOption

WithInsecureCertificates can be used to make proxy allow self-signed certificates for development.

func WithModifyResponse

func WithModifyResponse(callback func(*http.Response) error) proxyOption

WithModifyResponse sets the ModifyResponse callback function in Go's ReverseProxy.

func WithUserAgent

func WithUserAgent(ua string) proxyOption

WithUserAgent sets the user-agent of outgoing requests.

Types

This section is empty.

Jump to

Keyboard shortcuts

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