Documentation
¶
Index ¶
- func New(options ...Option) route.Middleware
- type Config
- type Option
- func BodyLimit(value string) Option
- func Development() Option
- func Disable(names ...string) Option
- func Next(fn func(ctx *route.Context) bool) Option
- func Production() Option
- func SkipPaths(values ...string) Option
- func Timeout(value time.Duration) Option
- func TrustedProxies(values ...string) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(options ...Option) route.Middleware
New creates the default security middleware chain.
Types ¶
type Config ¶
type Config struct {
Next func(ctx *route.Context) bool
Env string
Recover bool
RequestID bool
RealIP bool
Logger bool
BodyLimit bool
Timeout bool
Helmet bool
RecoverStack bool
BodyLimitValue string
TimeoutValue time.Duration
TrustedProxies []string
SkipPaths []string
}
Config configures the security middleware preset.
Click to show internal directories.
Click to hide internal directories.