Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Cors ¶
func Cors(corsOption *CorsOption) gin.HandlerFunc
================================================================================ * 跨域处理 * qq group: 582452342 * email : 2091938785@qq.com * author : 美丽的地球啊 - mliu * ================================================================================
func CorsMiddleware ¶
func CorsMiddleware(corsOption *CorsOption) gin.HandlerFunc
Types ¶
type CorsOption ¶
type CorsOption struct {
Domain string
Headers []string
Methods []string
IsCredentials bool //是否cookie
IsAllDomain bool //是否所有域
IsAllow bool //是否允许跨域
}
================================================================================ * 跨域中间件模块 * qq group: 582452342 * email : 2091938785@qq.com * author : 美丽的地球啊 - mliu * ================================================================================
Click to show internal directories.
Click to hide internal directories.