Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DefaultCORSConfig defeault config for cors DefaultCORSConfig = CorsConfig{ AllowOrigins: []string{"*"}, AllowMethods: []string{http.MethodGet, http.MethodHead, http.MethodPut, http.MethodPatch, http.MethodPost, http.MethodDelete}, } )
Functions ¶
func Cors ¶ added in v1.1.9
Cors Middleware with default config Reference https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
func CorsWithConfig ¶ added in v1.1.9
func CorsWithConfig(config CorsConfig) func(ctx *slide.Ctx) error
CorsWithConfig Cors with a config
Types ¶
Click to show internal directories.
Click to hide internal directories.