Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BasicAuth ¶
func BasicAuth(realm string, fn func(username, password string) bool) mps.MiddlewareFunc
BasicAuth returns a HTTP Basic Authentication middleware for requests You probably want to use mps.BasicAuth(proxy) to enable authentication for all proxy activities
func SetBasicAuth ¶
SetBasicAuth sets the request's Authorization header to use HTTP Basic Authentication with the provided username and password.
With HTTP Basic Authentication the provided username and password are not encrypted.
Some protocols may impose additional requirements on pre-escaping the username and password. For instance, when used with OAuth2, both arguments must be URL encoded first with url.QueryEscape.
func SingleHostReverseProxy ¶
func SingleHostReverseProxy(target *url.URL) mps.MiddlewareFunc
SingleHostReverseProxy returns a mps.Middleware URLs to the scheme, host, and base path provided in target. If the target's path is "/base" and the incoming request was for "/dir", the target request will be for /base/dir. SingleHostReverseProxy does not rewrite the Host header. To rewrite Host headers, use ReverseProxy directly with a custom Director policy.
Types ¶
This section is empty.