upstream

package
v7.0.0-...-1c7ecba Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SignatureHeader is the name of the request header containing the GAP Signature
	// Part of hmacauth
	SignatureHeader = "GAP-Signature"
)

Variables

View Source
var SignatureHeaders = []string{
	"Content-Length",
	"Content-Md5",
	"Content-Type",
	"Date",
	"Authorization",
	"X-Forwarded-User",
	"X-Forwarded-Email",
	"X-Forwarded-Preferred-User",
	"X-Forwarded-Access-Token",
	"Cookie",
	"Gap-Auth",
}

SignatureHeaders contains the headers to be signed by the hmac algorithm Part of hmacauth

Functions

func NewProxy

func NewProxy(upstreams options.UpstreamConfig, sigData *options.SignatureData, writer pagewriter.Writer) (http.Handler, error)

NewProxy creates a new multiUpstreamProxy that can serve requests directed to multiple upstreams.

Types

type ProxyErrorHandler

type ProxyErrorHandler func(http.ResponseWriter, *http.Request, error)

ProxyErrorHandler is a function that will be used to render error pages when HTTP proxies fail to connect to upstream servers.

Jump to

Keyboard shortcuts

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