Documentation ¶
Index ¶
- func BasicAuth(realm string, credentials map[string]string) zoox.Middleware
- func CORS(cfg ...*CorsConfig) zoox.Middleware
- func HealthCheck() zoox.Middleware
- func Jwt(secret string, algorithm ...string) zoox.Middleware
- func Logger() zoox.Middleware
- func RealIP() zoox.Middleware
- func Recovery() zoox.Middleware
- func Rewrite(cfg ...*RewriteConfig) zoox.Middleware
- func Timeout(timeout time.Duration) zoox.Middleware
- type CorsConfig
- type RewriteConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CORS ¶ added in v1.0.20
func CORS(cfg ...*CorsConfig) zoox.Middleware
func HealthCheck ¶
func HealthCheck() zoox.Middleware
func Logger ¶
func Logger() zoox.Middleware
Logger is a middleware that logs the request as it goes through the handler.
func RealIP ¶
func RealIP() zoox.Middleware
func Rewrite ¶ added in v1.0.20
func Rewrite(cfg ...*RewriteConfig) zoox.Middleware
Types ¶
type CorsConfig ¶ added in v1.0.20
type CorsConfig struct { IgnoreFunc func(ctx *zoox.Context) bool AllowOrigins []string AllowOriginFunc func(origin string) bool AllowMethods []string AllowHeaders []string AllowCredentials bool ExposeHeaders []string }
func DefaultCorsConfig ¶ added in v1.0.20
func DefaultCorsConfig() *CorsConfig
type RewriteConfig ¶ added in v1.0.20
Click to show internal directories.
Click to hide internal directories.