cors

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 23, 2020 License: MIT Imports: 2 Imported by: 0

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 * ================================================================================

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL