cors

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 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) webing.RequestHandler

================================================================================ * cors * author: 美丽的地球啊 - mliu * ================================================================================

func CorsMiddleware

func CorsMiddleware(corsOption *CorsOption) webing.RequestHandler

Types

type CorsOption

type CorsOption struct {
	Domain        string   //域名
	Headers       []string //请求头
	Methods       []string //请求方法
	IsCredentials bool     //是否cookie
	IsAllDomain   bool     //是否所有域
	IsDisabled    bool     //是否允许跨域

}

================================================================================ * cors middleware * author: 美丽的地球啊 - mliu * ================================================================================

Jump to

Keyboard shortcuts

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