proxy

package
v0.9.1-0...-cc718b5 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2019 License: GPL-3.0, MIT Imports: 8 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 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