Documentation
¶
Overview ¶
Package middleware provides a standard set of middleware for pomerium.
Index ¶
- func CorsBypass(target http.Handler) func(next http.Handler) http.Handler
- func Healthcheck(endpoint, msg string) func(http.Handler) http.Handler
- func SetHeaders(headers map[string]string) func(next http.Handler) http.Handler
- func StripCookie(cookieName string) func(next http.Handler) http.Handler
- func TimeoutHandlerFunc(timeout time.Duration, timeoutError string) func(next http.Handler) http.Handler
- func ValidateRequestURL(r *http.Request, key string) error
- func ValidateSignature(sharedSecret string) func(next http.Handler) http.Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CorsBypass ¶ added in v0.4.0
CorsBypass is middleware that takes a target handler as a paramater, if the request is determined to be a CORS preflight request, that handler is called instead of the normal handler chain.
func Healthcheck ¶ added in v0.0.2
Healthcheck endpoint middleware useful to setting up a path like `/ping` that load balancers or uptime testing external services can make a request before hitting any routes. It's also convenient to place this above ACL middlewares as well.
func SetHeaders ¶
SetHeaders sets a map of response headers.
func StripCookie ¶ added in v0.4.0
StripCookie strips the cookie from the downstram request.
func TimeoutHandlerFunc ¶ added in v0.4.0
func TimeoutHandlerFunc(timeout time.Duration, timeoutError string) func(next http.Handler) http.Handler
TimeoutHandlerFunc wraps http.TimeoutHandler
func ValidateRequestURL ¶ added in v0.5.1
ValidateRequestURL validates the current absolute request URL was signed by a given shared key.
Types ¶
This section is empty.