middleware

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLogMiddleware

type CLogMiddleware struct{}

CLogMiddleware 日志中间件

func (*CLogMiddleware) Instance

func (log *CLogMiddleware) Instance() func(*cc.Context) cc.Response

type CorsMiddleware

type CorsMiddleware struct {
	Origin  string
	Methods string
	Headers string
}

CorsMiddleware 跨域中间件

func (*CorsMiddleware) Instance

func (cors *CorsMiddleware) Instance() func(*cc.Context) cc.Response

Cors 跨域设置

func (*CorsMiddleware) SetHeaders

func (cors *CorsMiddleware) SetHeaders(headers ...string)

SetHeaders 设置跨域请求头

func (*CorsMiddleware) SetMethods

func (cors *CorsMiddleware) SetMethods(methods ...string)

SetMethods 设置跨域方法

func (*CorsMiddleware) SetOrigin

func (cors *CorsMiddleware) SetOrigin(origin string)

SetOrigin设置跨域源

Jump to

Keyboard shortcuts

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