Versions in this module Expand all Collapse all v3 v3.7.3 Apr 29, 2020 Changes in this version + type Authenticator interface + Authenticate func(username, password string) (ok bool, err error) + func AuthUser(username, password string) Authenticator + func AuthUsers(usernamesPasswords map[string]string) Authenticator + type CORSConfig struct + AllowCredentials bool + AllowedHeaders []string + AllowedMethods []string + AllowedOrigins []string + ExposedHeaders []string + MaxAge int + type MiddlewareFunc func(next http.Handler) http.Handler + func BasicAuth(realm string, authenticator Authenticator) MiddlewareFunc + func CORS(config CORSConfig) MiddlewareFunc + func FillContext(fillers ...fillcontext.Filler) MiddlewareFunc + func Log(logger log.Interface) MiddlewareFunc + func MaxBody(maxBytes int64) MiddlewareFunc + func Metadata(keys ...string) MiddlewareFunc + func ProxyHeaders(config ProxyConfiguration) MiddlewareFunc + func Recover() MiddlewareFunc + func Redirect(config RedirectConfiguration) MiddlewareFunc + func RequestID() MiddlewareFunc + func RequestURL() MiddlewareFunc + func SecurityHeaders() MiddlewareFunc + type ProxyConfiguration struct + Trusted []*net.IPNet + func (c *ProxyConfiguration) ParseAndAddTrusted(cidrs ...string) error + type RedirectConfiguration struct + Code int + HostName func(string) string + Path func(string) string + Port func(uint) uint + Scheme func(string) string