package
0.6.1
Repository: https://github.com/5-say/go-tool.git
Documentation: pkg.go.dev

# README

jwtx

跨域资源共享 CORS

使用官方 cors 全局中间件,并添加以下必要配置

r.Use(cors.New(cors.Config{

    // 允许跨域请求携带 Authorization 头信息
    AllowMethods:  []string{"OPTIONS"},
    AllowHeaders:  []string{"Authorization"},

    // 允许跨域请求获取 token 响应头
    ExposeHeaders: []string{"token"},
}))

# Packages

No description provided by the author
No description provided by the author
No description provided by the author

# Functions

获取当前登录的账户信息,需配合中间件使用.
初始化分组(支持多次调用) group string 分组名称 configPath string 分组配置文件路径 privateKeyPath string 分组私钥文件路径 e.g.

# Variables

MiddlewareHandlerFunc ..
单例.

# Structs

No description provided by the author
分组配置.
SingletonMode ..