Documentation ¶
Index ¶
- Constants
- func NewBufferPool() httputil.BufferPool
- func NewSingleHostReverseProxy(target *url.URL, opts ...proxyOption) *httputil.ReverseProxy
- func WithBasicAuth(user, pass string) proxyOption
- func WithErrorHandler(handler func(http.ResponseWriter, *http.Request, error)) proxyOption
- func WithInsecureCertificates(enable bool) proxyOption
- func WithModifyResponse(callback func(*http.Response) error) proxyOption
- func WithUserAgent(ua string) proxyOption
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 ¶
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.
Click to show internal directories.
Click to hide internal directories.