proxy

package
v0.10.3-rc2 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2020 License: GPL-3.0, MIT Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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