Documentation
¶
Overview ¶
Package middleware provides a standard set of middleware for pomerium.
Index ¶
- 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 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.
Directories
¶
Path | Synopsis |
---|---|
Package responsewriter contains helper functions that useful for hooking into various parts of a response.
|
Package responsewriter contains helper functions that useful for hooking into various parts of a response. |
Click to show internal directories.
Click to hide internal directories.