Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Proxy ¶
type Proxy struct {
// contains filtered or unexported fields
}
Proxy is a HTTPS reverse proxy. It is a man-in-the-middle proxy that intercepts and redirects requests to a HTTP host. It can optional forward the requests that match a list of path prefixes to the real HTTPS server.
func New ¶
New returns a new HTTPS reverse proxy to a HTTP host, with an list of path prefixes that should be forwarded to the nextHost.
func (*Proxy) ServeHTTP ¶
func (hp *Proxy) ServeHTTP(w http.ResponseWriter, req *http.Request)
ServeHTTP forwards requests to the next host if its path matches the given list of prefixes, otherwise it forwards the request to the masquerading HTTP host.
func (*Proxy) StartServer ¶
StartServer starts a HTTPS server for the reverse proxy.
Click to show internal directories.
Click to hide internal directories.