http

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2025 License: Apache-2.0 Imports: 20 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checker added in v0.5.0

type Checker interface {
	Check(r *http.Request) error
}

func NewBypassChecker added in v0.5.0

func NewBypassChecker(byPassPatterns []string) (Checker, error)

func NewOriginChecker added in v0.5.0

func NewOriginChecker(allowedOrigins []string) Checker

type HTTPProxyError

type HTTPProxyError interface {
	error
	MarshalJSON() ([]byte, error)
	StatusCode() int
}

func NewHTTPProxyError

func NewHTTPProxyError(statusCode int, err error) HTTPProxyError

type Proxy

type Proxy struct {
	// contains filtered or unexported fields
}

Proxy represents HTTP Proxy.

func NewProxy

func NewProxy(config mgate.Config, handler session.Handler, logger *slog.Logger, allowedOrigins []string, bypassPaths []string) (Proxy, error)

func (Proxy) Listen

func (p Proxy) Listen(ctx context.Context) error

func (Proxy) ServeHTTP

func (p Proxy) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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