Versions in this module Expand all Collapse all v1 v1.0.1 Aug 1, 2022 Changes in this version + const HTTPMethodOverrideFormKey + const HTTPMethodOverrideHeader + func CORS(opts ...CORSOption) func(http.Handler) http.Handler + func CanonicalHost(domain string, code int) func(h http.Handler) http.Handler + func CombinedLoggingHandler(out io.Writer, h http.Handler) http.Handler + func CompressHandler(h http.Handler) http.Handler + func CompressHandlerLevel(h http.Handler, level int) http.Handler + func ContentTypeHandler(h http.Handler, contentTypes ...string) http.Handler + func CustomLoggingHandler(out io.Writer, h http.Handler, f LogFormatter) http.Handler + func HTTPMethodOverrideHandler(h http.Handler) http.Handler + func LoggingHandler(out io.Writer, h http.Handler) http.Handler + func ProxyHeaders(h http.Handler) http.Handler + func RecoveryHandler(opts ...RecoveryOption) func(h http.Handler) http.Handler + type CORSOption func(*cors) error + func AllowCredentials() CORSOption + func AllowedHeaders(headers []string) CORSOption + func AllowedMethods(methods []string) CORSOption + func AllowedOriginValidator(fn OriginValidator) CORSOption + func AllowedOrigins(origins []string) CORSOption + func ExposedHeaders(headers []string) CORSOption + func IgnoreOptions() CORSOption + func MaxAge(age int) CORSOption + func OptionStatusCode(code int) CORSOption + type LogFormatter func(writer io.Writer, params LogFormatterParams) + type LogFormatterParams struct + Request *http.Request + Size int + StatusCode int + TimeStamp time.Time + URL url.URL + type MethodHandler map[string]http.Handler + func (h MethodHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) + type OriginValidator func(string) bool + type RecoveryHandlerLogger interface + Println func(...interface{}) + type RecoveryOption func(http.Handler) + func PrintRecoveryStack(print bool) RecoveryOption + func RecoveryLogger(logger RecoveryHandlerLogger) RecoveryOption