Versions in this module Expand all Collapse all v1 v1.0.0 Nov 10, 2022 Changes in this version + func IncomingRequestFromContext(ctx context.Context) *http.Request + func IpFromContext(ctx context.Context) string + type AfterReceive func(http.ResponseWriter, *http.Response, *HostForward) error + type BeforeSend func(http.ResponseWriter, *http.Request, *HostForward) error + type HostForward struct + AfterReceiveFunc AfterReceive + BeforeSendFunc BeforeSend + Forward string + ForwardHost string + Host string + func (hf *HostForward) String() string + type ReverseProxy struct + AllowCrossOrigin bool + HostForwards []*HostForward + Prefix string + func NewReverseProxy(hostForwards []*HostForward, listen string, prefix string, ...) *ReverseProxy + func ReverseProxyFromContext(ctx context.Context) *ReverseProxy + func (rp *ReverseProxy) ComputeForwardUrl(incomingRequestURL string, hostForward *HostForward) (string, error) + func (rp *ReverseProxy) RewriteHostQueryRequest(request *http.Request) error + func (rp *ReverseProxy) RewriteHostResponseBody(response *http.Response) error + func (rp *ReverseProxy) RewriteLocation(location string) string + func (rp *ReverseProxy) ServeHTTP(writer http.ResponseWriter, incomingRequest *http.Request) + func (rp *ReverseProxy) Start() error + func (rp *ReverseProxy) Stop(timeout time.Duration) error + func (rp *ReverseProxy) UseAutocert(autocertdomain string) + func (rp *ReverseProxy) UseCertificate(crtfile string, keyfile string) + type StatusError struct + Code int + ContentType string + Message string + func NewStatusError(message string, code int) *StatusError + func NewStatusErrorWithContentType(message string, code int, contentType string) *StatusError + func (e *StatusError) Error() string