Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllowCrossDomain ¶
type AllowCrossDomain struct { // 允许跨域源 AllowOrigin string // 允许跨域方法 格式 GET, POST, DELETE,PUT AllowMethods string // 允许跨域请求头 AllowHeaders string }
AllowCrossDomain 组装一个Middleware服务,实现允许跨域请求
func (*AllowCrossDomain) LastInit ¶
func (allow *AllowCrossDomain) LastInit(config *freefishgo.Config)
LastInit 中间件注册时调用函数进行该中间件最后的设置
func (*AllowCrossDomain) Middleware ¶
func (allow *AllowCrossDomain) Middleware(ctx *freefishgo.HttpContext, next freefishgo.Next) *freefishgo.HttpContext
Middleware 中间件实现允许跨域请求
Click to show internal directories.
Click to hide internal directories.