mirror of
https://github.com/WJQSERVER-STUDIO/ghproxy.git
synced 2026-02-03 00:01:10 +08:00
2.1.0 (#47)
2.1.0 --- - RELEASE: v2.1.0正式版发布; - CHANGE: 加入`FreeBSD`与`Darwin`系统支持 - CHANGE: 更新安全政策, v1和24w版本序列生命周期正式结束 - ADD: 加入`timing`中间件记录响应时间 - ADD: 加入`loggin`中间件包装日志输出 - CHANGE: 更新logger版本至v1.3.0 - CHANGE: 改进日志相关 - ADD: 加入日志等级配置项
This commit is contained in:
parent
f5c32915b9
commit
09163ed4df
26 changed files with 296 additions and 44 deletions
|
|
@ -13,7 +13,7 @@ func AuthHeaderHandler(c *gin.Context, cfg *config.Config) (isValid bool, err st
|
|||
}
|
||||
// 获取"GH-Auth"的值
|
||||
authToken := c.GetHeader("GH-Auth")
|
||||
logInfo("%s %s %s %s %s AUTH_TOKEN: %s", c.Request.Method, c.Request.Host, c.Request.URL.Path, c.Request.Proto, c.Request.RemoteAddr, authToken)
|
||||
logDebug("%s %s %s %s %s AUTH_TOKEN: %s", c.Request.Method, c.Request.Host, c.Request.URL.Path, c.Request.Proto, c.Request.RemoteAddr, authToken)
|
||||
if authToken == "" {
|
||||
err := "Auth Header == nil"
|
||||
return false, err
|
||||
|
|
@ -25,6 +25,5 @@ func AuthHeaderHandler(c *gin.Context, cfg *config.Config) (isValid bool, err st
|
|||
return false, err
|
||||
}
|
||||
|
||||
logInfo("auth SUCCESS: %t", isValid)
|
||||
return isValid, ""
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue