proxy

package
v0.0.0-...-de0cf75 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Proxy

type Proxy struct {
	ReverseProxy *httputil.ReverseProxy
	Host         string
}

Proxy represents a reverse proxy to a backend server.

func NewProxy

func NewProxy(host string) (*Proxy, error)

NewProxy creates a new Proxy instance for the given host.

func (*Proxy) ServeHTTP

func (p *Proxy) ServeHTTP(res http.ResponseWriter, req *http.Request)

ServeHTTP serves HTTP requests by forwarding them to the backend server.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL