Documentation ¶
Index ¶
- func AllowAll() func(*Options)
- func SetAllowCredentials(allowCredentials bool) func(*Options)
- func SetAllowOriginFunc(allowOriginFunc func(origin string) bool) func(*Options)
- func SetAllowOriginRequestFunc(allowOriginRequestFunc func(ctx *fasthttp.RequestCtx, origin string) bool) func(*Options)
- func SetAllowedHeaders(allowedHeaders []string) func(*Options)
- func SetAllowedMethods(allowedMethods []string) func(*Options)
- func SetAllowedOrigins(allowedOrigins []string) func(*Options)
- func SetDebug(debug bool) func(*Options)
- func SetExposedHeaders(exposedHeaders []string) func(*Options)
- func SetLogger(logger Logger) func(*Options)
- func SetMaxAge(maxAge int) func(*Options)
- type Logger
- type Options
- type RequestMiddleware
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetAllowCredentials ¶
func SetAllowOriginFunc ¶
func SetAllowOriginRequestFunc ¶
func SetAllowOriginRequestFunc(allowOriginRequestFunc func(ctx *fasthttp.RequestCtx, origin string) bool) func(*Options)
func SetAllowedHeaders ¶
func SetAllowedMethods ¶
func SetAllowedOrigins ¶
func SetExposedHeaders ¶
Types ¶
type RequestMiddleware ¶
type RequestMiddleware func(fasthttp.RequestHandler) fasthttp.RequestHandler
func New ¶
func New(opts ...func(*Options)) RequestMiddleware
Click to show internal directories.
Click to hide internal directories.