Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = Config{ Skip: nil, AllowOrigins: "*", AllowMethods: strings.Join([]string{ http.MethodGet, http.MethodPost, http.MethodHead, http.MethodPut, http.MethodDelete, http.MethodPatch, }, ","), AllowHeaders: "", AllowCredentials: false, ExposeHeaders: "", MaxAge: 0, }
Functions ¶
Types ¶
type Config ¶
type Config struct { // Skip the middleware when this func return true. // // Optional. Default: nil Skip func(*kid.Ctx) bool // Optional. Default value "*" AllowOrigins string // Optional. Default value "GET,POST,HEAD,PUT,DELETE,PATCH" AllowMethods string // Optional. Default value "". AllowHeaders string // Optional. Default value false. AllowCredentials bool // Optional. Default value "". ExposeHeaders string // Optional. Default value 0. MaxAge int }
Click to show internal directories.
Click to hide internal directories.