Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ReverseProxy ¶
type ReverseProxy struct { // The transport used to perform upstream requests. Upstream types.Upstream // Logger specifies a logger for errors that occur when attempting // to proxy the request. Logger types.Logger Settings Settings }
ReverseProxy is an HTTP Handler that takes an incoming request and sends it to another server, proxying the response back to the client.
func New ¶
func New(cfg *config.Handler, l *types.Location, next types.RequestHandler) (*ReverseProxy, error)
New returns a configured and ready to use Upstream instance.
func (*ReverseProxy) RequestHandle ¶
func (p *ReverseProxy) RequestHandle(_ context.Context, w http.ResponseWriter, r *http.Request)
RequestHandle implements the nedomi interface
func (*ReverseProxy) ServeHTTP ¶
func (p *ReverseProxy) ServeHTTP(rw http.ResponseWriter, req *http.Request)
Click to show internal directories.
Click to hide internal directories.