Documentation ¶
Overview ¶
Package proxy provides a more featureful abstraction on top of httputil.ReverseProxy.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ReverseProxy ¶
type ReverseProxy struct { *httputil.ReverseProxy // contains filtered or unexported fields }
func NewReverseProxy ¶
func NewReverseProxy(target url.URL, htmlMutator htmlmut.MutateFunc) *ReverseProxy
func (*ReverseProxy) ServeHTTP ¶
func (rp *ReverseProxy) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP serves the reverse proxy. If the request has a path that starts with the previously given targetURL, the server will 301 redirect that to a request with the path trimmed.
Click to show internal directories.
Click to hide internal directories.